This doesn't work:

sage: list_plot([[0, 0.7886751345948214], [0.01, 0.788675134595], [0.02, 
0.788675134595], [0.03, 0.788675134595], [0.04, 0.788675134595], [0.05, 
0.788675134595], [0.06, 0.788675134595], [0.07, 0.788675134595], [0.08, 
0.788675134595], [0.09, 0.788675134595], [0.1, 0.788675134595]])

The y-values are (almost) all the same, but matplotlib gets stuck trying
to decide on the ticks:

/opt/sage/local/lib/python2.6/site-packages/matplotlib/axis.pyc in 
get_minorticklabels(self)
   1076     def get_minorticklabels(self):
   1077         'Return a list of Text instances for the minor ticklabels'
-> 1078         ticks = self.get_minor_ticks()
   1079         labels1 = [tick.label1 for tick in ticks if tick.label1On]
   1080         labels2 = [tick.label2 for tick in ticks if tick.label2On]

/opt/sage/local/lib/python2.6/site-packages/matplotlib/axis.pyc in 
get_minor_ticks(self, numticks)
   1190         'get the minor tick instances; grow as necessary'
   1191         if numticks is None:
-> 1192             numticks = len(self.get_minor_locator()())
   1193 
   1194         if len(self.minorTicks) < numticks:

/opt/sage/local/lib/python2.6/site-packages/matplotlib/ticker.pyc in 
__call__(self)
   1424 
   1425         # don't create minor ticks on top of existing major ticks
-> 1426         diff = 0.5 * abs(locs[1] - locs[0])
   1427         locs = [l for l in locs if (np.abs(l - majorlocs) > diff).all()]
   1428 

IndexError: index out of bounds

It seems like list_plot should return something in this case. What
matplotlib magic do we need to get some kind of plot? If I plot a
constant function with plot(), it works fine.

Ideas?

Dan

--
---  Dan Drake
-----  http://mathsci.kaist.ac.kr/~drake
-------

Attachment: signature.asc
Description: Digital signature

Reply via email to