On Sep 3, 2010, at 4:33 AM, Sébastien Barthélemy wrote:

> Hello,
> 
> While using sage [1], I got problems drawing a line: for some reason,
> the points with negative coordinates are not plotted (or are plotted
> on top of others due to an offset problem and thus I cannot see them).
> I can only reproduce the bug with specific data sets.
> 
> I think I could track down the bug to matplotlib, which sage uses to
> render 2d plots.
> 
> I included a sage script which generates the data set (in a pickle
> file), and a python script which draws the faulty line.
> 
> Usage is :
> 
> $ sage generate_data.sage
> $ python test_mpl.py
> 
> I also included the pickled data, thus you don't need sage at all.
> I use matplotlib 1.0.0 for python 2.6 on mac os (as provided by macport).
> 
> Could somebody here confirm the problem, and give me a hint about what
> is going on?

I can confirm the issue. This appears to be a drawing bug: when I pan the 
drawing so that the negative data touches the edge of the axes frame, the rest 
of the line is drawn. So the line object is being created, but for some reason 
it's not being drawn correctly.

The bug is really finicky: if I plot starting from the 3rd value of your data 
(i.e. slice xdata, ydata with [2:]), the line is drawn completely. The strange 
thing is that the first 100 or so data points defines the exact same point, so 
there's noting special about those first two points. (but this overlaying of 
data may be related to the bug)

I've reproduced the issue on TkAgg, Qt4Agg, and MacOSX backends, so maybe the 
bug is in backend_bases. (Note: unlike Agg backends, MacOSX backend doesn't 
show line even after panning the plot)

I don't really know how to debug drawing errors like this; so this is as far as 
can get.

Best,
-Tony

> 
> Regards
> Sebastien
> 
> [1] www.sagemath.org
> <generate_data.sage><test_mpl.py><traj_mod.pickle>

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to