Hi,
When I do an errorbar plot (a.errorbar(), a = axis) with negative values and
then try to change the yscale to log (a.set_yscale('log')) matplotlib
crashes with:
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 14636, in <lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "/home/specuser/new_workspace/TestDriven/src/RAWPlot.py", line 371,
in plotSASM
line, ec, el = a.errorbar(sasm.q[q_min:q_max], sasm.i[q_min:q_max],
sasm.err[q_min:q_max], picker = 3, label = legend_label, **kwargs)
File "/usr/lib64/python2.6/site-packages/matplotlib/axes.py", line 4872,
in errorbar
barcols.append( self.vlines(x, lower, upper, **lines_kw) )
File "/usr/lib64/python2.6/site-packages/matplotlib/axes.py", line 3302,
in vlines
self.autoscale_view()
File "/usr/lib64/python2.6/site-packages/matplotlib/axes.py", line 1627,
in autoscale_view
YL = self.yaxis.get_major_locator().view_limits(y0, y1)
File "/usr/lib64/python2.6/site-packages/matplotlib/ticker.py", line 1119,
in view_limits
if not is_decade(vmin,self._base): vmin = decade_down(vmin,self._base)
File "/usr/lib64/python2.6/site-packages/matplotlib/ticker.py", line 1030,
in is_decade
return lx==int(lx)
OverflowError: cannot convert float infinity to integer
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 14636, in <lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "/home/specuser/new_workspace/TestDriven/src/RAW.py", line 1953, in
addItem
newItem = ManipItemPanel(self.underpanel, sasm, font_colour =
item_colour)
File "/home/specuser/new_workspace/TestDriven/src/RAW.py", line 2353, in
__init__
color = conv.to_rgb(self.sasm.line.get_mfc())
AttributeError: 'NoneType' object has no attribute 'get_mfc'
I don't think this should be the expected outcome.. rather it should not
plot values that are illegal/negative (i.e. ignore them).
Is there a way I can get around this without having to search through my
data and remove points that are negative or NaN or INF when the yscale needs
to be log? That would also show an incorrect curve since a line would be
drawn across the points that were removed.. It should rather be gaps in the
line.
Thanks,
Soren
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users