Robert Leftwich | 1 Mar 01:39 2005

GPF on XP

When attempting to generate a larger number of graph sets (i.e. 3 graphs of 
similar style over different data ranges), I'm intermittently getting a GPF on 
XP in na_backend_agg.pyd according to the report that M$ offers to send to itself.

It is repeatable in one sense, in that if I restart the graph generation from 
the beginning it will fail at the same set, but if skip the first set of graphs 
it doesn't produce one additional set and then die, it dies at 15 (5 sets) 
earlier. I can restart from any of the sets where it failed and it will continue 
on for some random number before GPF'ing again - anything from 9 thru to 150 
graphs or so.

If I use Numeric (23.7, the latest) it is a lot worse - meaning fewer sets 
before failure. Also matplotlib 0.72 was a lot worse with either Numeric and 
numarray.

The environment is Python 2.4, XP (sp2), matplotlib 0.72.1, numarray 1.2.2, 
Numeric 23.7 with the data coming from Postgres 8.0 via SQLObject and psycopg.

I'm not sure of the best way to proceed from here - is this a known issue or 
related to one or should I attempt to produce a standalone test that causes the 
problem?

Robert

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
(Continue reading)

Stephen Walton | 1 Mar 01:12 2005

New log plot problem

Hi, all,

Well, I've hit a new problem with the log plotting issue.  Try the 
following commands after 'ipython -pylab':

x=arange(25)+1
semilogx(x,x**2)
hold(False)
semilogx(x,x**2)

I get an apparently unbreakable chain of "Cannot take log of nonnegative 
value" messages for every following plot(), semilog(), or loglog() 
command until ipython is exited.  None of close(1), clf(), or cla() 
helps clear the problem.  Only creating a new figure with figure(2) and 
plotting to it seems to help.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
John Hunter | 1 Mar 01:10 2005

Re: New log plot problem

>>>>> "Stephen" == Stephen Walton <stephen.walton@...> writes:

    Stephen> Hi, all, Well, I've hit a new problem with the log
    Stephen> plotting issue.  Try the following commands after
    Stephen> 'ipython -pylab':

    Stephen> x=arange(25)+1 semilogx(x,x**2) hold(False)
    Stephen> semilogx(x,x**2)

    Stephen> I get an apparently unbreakable chain of "Cannot take log
    Stephen> of nonnegative value" messages for every following
    Stephen> plot(), semilog(), or loglog() command until ipython is
    Stephen> exited.  None of close(1), clf(), or cla() helps clear
    Stephen> the problem.  Only creating a new figure with figure(2)
    Stephen> and plotting to it seems to help.

rm -rf your build subdir and reinstall matplotlib 0.72.1 or CVS.  The
error string you report doesn't exist in the current code base, and I
can't reproduce your error.

JDH

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Stephen Walton | 1 Mar 01:32 2005

Re: New log plot problem

John Hunter wrote:

>rm -rf your build subdir and reinstall matplotlib 0.72.1 or CVS.
>
Ouch.  Sorry for the noise.  I slipped up when I ran Fernando's 
pybrpm-noarch script on matplotlib 0.72 and wound up with a reinstall of 
an old 0.70 RPM.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Robert Leftwich | 1 Mar 02:39 2005

Re: GPF on XP

John Hunter wrote:
> 
> Repeatable is good.  Standalone much better.  So you are running the
> pure Agg backend (no GUI?).  It would help to post the output of 
> 
>   c:> python myscript.py --verbose-helpful

Correct, no gui, verbose output:

matplotlib data path C:\Python24\share\matplotlib
loaded rc file C:\Python24\share\matplotlib\.matplotlibrc
matplotlib version 0.72.1
verbose.level helpful
interactive is False
platform is win32
numerix numarray 1.2.2
font search path ['C:\\Python24\\share\\matplotlib']
loaded ttfcache file c:\home\robert\.ttffont.cache
backend TkAgg version 8.4

> It probably won't happen with 0.71 and this would be worth testing.

Everything works without error on 0.71, using either numarray or Numeric.

> But if you can
> get a standalone script, that would be most efficient.

Working on it now.

Robert
(Continue reading)

John Hunter | 1 Mar 03:19 2005

Re: GPF on XP

>>>>> "Robert" == Robert Leftwich <robert@...> writes:

    Robert> John Hunter wrote:
    >> Repeatable is good.  Standalone much better.  So you are
    >> running the pure Agg backend (no GUI?).  It would help to post
    >> the output of c:> python myscript.py --verbose-helpful

    Robert> Correct, no gui, verbose output:

You say no gui, but the verbose report says tkagg:

    backend TkAgg version 8.4

Do you see the problem when using agg alone?

    >> But if you can get a standalone script, that would be most
    >> efficient.

    Robert> Working on it now.

Looking forward to it :-)

JDH

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
(Continue reading)

Robert Leftwich | 1 Mar 04:38 2005

Re: GPF on XP

John Hunter wrote:
 >>>>>>"Robert" == Robert Leftwich <robert@...> writes:
 >
 >     Robert> Correct, no gui, verbose output:
 >
 > You say no gui, but the verbose report says tkagg:
 >
 >     backend TkAgg version 8.4

My bad, forgot to change the rc when re-installing 0.72.

 >
 > Do you see the problem when using agg alone?

Yes, in fact it seems to be worse.

 >
 >     >> But if you can get a standalone script, that would be most
 >     >> efficient.
 >
 >     Robert> Working on it now.
 >
 > Looking forward to it :-)

I sent it direct to you, rather than everyone on the list.

Robert

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
(Continue reading)

John Hunter | 1 Mar 03:49 2005

Re: strange thing inside eps file

>>>>> "Humufr" == Humufr  <humufr@...> writes:

    Humufr> Hi, I found something strange inside the eps file create
    Humufr> with matplotlib. I used matplotlib to trace a port of a
    Humufr> spectra (I used the function plot and axis). I have been
    Humufr> very surprise to see that all the spectra was inside the
    Humufr> eps file. To see it, I must admit that I did something
    Humufr> weird. I create an eps file with matplotlib and I
    Humufr> transform the file in svg format with pstoedit and I edit
    Humufr> this file with inkscape.

    Humufr> I don't know where is the problem but I don't think that
    Humufr> it's necessary to have all the point inside the output
    Humufr> file, perhaps it's not possible to do anything to change
    Humufr> it but that can create some huge file. So if nothing can
    Humufr> be done, that will be a good idea to put it in the FAQ to
    Humufr> let the users cut their data if needed.

This is intentional, but I can see the problems it could create for a
large PS file, so it may be worth mentioning this in the
documentation.  Basically, we leave it or the backend to do the
clipping to the view limits, and in postscript the total line path is
drawn and the clip rectangle is set.  It would be difficult and
inefficient for us to do the clipping in the front end.  Think about
pathological cases, for example, where the x,y center of a marker is
far outside the view limits, but the marker is very large so that some
of its vertices are inside the view limits.

Earlier versions of matplotlib had a data clipping feature where line
points outside the view box were removed before adding them to the
(Continue reading)

John Hunter | 1 Mar 03:56 2005

Re: autoscale

>>>>> "Humufr" == Humufr  <humufr@...> writes:

    Humufr>        Hi, I see a problem when I'm using autoscale. I
    Humufr> have a spectra with huge difference in y. I used xlim to
    Humufr> look only a part of my spectra and the ylim is not
    Humufr> autoscale to this peculiar part of the spectra but on all
    Humufr> the spectra.

    Humufr> I'm using the last CVS version.

This was done intentionally for performance reasons.  Every plot
command calls autoscale, and each time this happens the autoscaler
would have to iterate over all the data in the axes (text, polygons,
lines, etc) and determine the vertices in the view limits.  Certainly
doable, but I try to make mpl reasonably efficient for large data sets
and this could get expensive.  Instead, when a piece of data is added
to the axes initially, I update the datalim with it and use that in
the autoscaler.

I'm aware of the problem you describe -- autoscaling can be suboptimal
when you initially set an axis view to only a part of the axes.  This
is a problem I can live with -- autoscaling doesn't have to be
perfect, it just needs to get it right most of the time.  And when it
doesn't do the most sensible thing, eg in this case, it at least
includes your data in the plot, and it is fairly easy for you to use
the navigation controls -- eg constrained y zoom by pressing y and
dragging the right mouse -- or otherwise set the limits manually.

So this is an area where I'd rather trade convenience for performance.
It wouldn't be to much work though, to add an option to the the
(Continue reading)

John Hunter | 1 Mar 04:09 2005

Re: plot array starting or ending with nan

>>>>> "Darren" == Darren Dale <dd55@...> writes:

    Darren> I need to plot some arrays that may begin or end with
    Darren> nan's. Currently, mpl does a good job handling something
    Darren> like plot([1,2,nan,4]), but the has trouble with
    Darren> plot([nan,2,3,4]) and plot([1,2,3,nan]).

    Darren> Could somebody point me in the right direction: where can
    Darren> I look in the sourcecode to learn how mpl deals with
    Darren> plotting nans?

mpl doesn't explicitly do anything with nan .  I think what you are
observing has something to do with how agg is handling these values,
because they are passed straight through to the backend.

So, for now, there is no place in the mpl code to go, though I would
like to add some support for nan, or masked arrays, or masks, in the
future.

JDH

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

Gmane