Error

Hi,
My problem is that: http://pastebin.com/ZPzdC5c8
but on my code: http://pastebin.com/Rgbm2Fgd
I include the use command as a firstline

what could be?

Thanks
Waleria

Waleria,

I don’t think the error is with matplotlib. That error should really just be a warning. This seems to be the real error: “[Wed Sep 15 14:03:17 2010] [error] [client 127.0.0.1] File does not exist: /var/www/django/grafico, referer: http://localhost/simuladores/index/

As for your imports, you really should consolidate and simplify it. The reason for importing only certain things is to prevent importing too much code and to keep the namespace clean. However, once you do “from matplotlib import use”, python still has to process all of matplotlib. So, either import everything you need at that line or work from the matplotlib namespace (import matplotlib as mpl).

Also, I would be cautious about using both pylab and matplotlib.pyplot in the same code. These modules each make different assumptions about how you code and mixing them can cause some odd behaviors.

I hope this helps,

Ben Root

···

On Wed, Sep 15, 2010 at 2:29 PM, Waléria Antunes David <waleriantunes@…287…> wrote:

Hi,
My problem is that: http://pastebin.com/ZPzdC5c8
but on my code: http://pastebin.com/Rgbm2Fgd
I include the use command as a firstline

what could be?

Thanks
Waleria

Do you have a specific example? pylab is just pyplot with some
additional imports from mlab and numpy. Otherwise, they're the same
plotting API.

Ryan

···

On Wed, Sep 15, 2010 at 4:45 PM, Benjamin Root <ben.root@...1304...> wrote:

Also, I would be cautious about using both pylab and matplotlib.pyplot in
the same code. These modules each make different assumptions about how you
code and mixing them can cause some odd behaviors.

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

Sorry, no, I don’t have any specific examples. Only that I have seen “mysterious” issues disappear when the code was converted into one style or the other. This was way back in the days when I was just learning matplotlib, so I really didn’t understand what I was doing at the time. In any case, it was those issues that caused me to completely switch over to the pyplot style.

Ben Root

···

On Wed, Sep 15, 2010 at 8:07 PM, Ryan May <rmay31@…287…> wrote:

On Wed, Sep 15, 2010 at 4:45 PM, Benjamin Root <ben.root@…1304…> wrote:

Also, I would be cautious about using both pylab and matplotlib.pyplot in

the same code. These modules each make different assumptions about how you

code and mixing them can cause some odd behaviors.

Do you have a specific example? pylab is just pyplot with some

additional imports from mlab and numpy. Otherwise, they’re the same

plotting API.

Ryan