CC to matplotlib-devel & matplotlib-users
2010/9/3 Tony S Yu <tsyu80@...149...>:
While using sage , 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.
Great, thank you. I filed a bug:
On Sep 3, 2010, at 4:33 AM, Sébastien Barthélemy wrote:
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.