id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,work_issues,upstream,reviewer,author,merged,dependencies,stopgaps
11973,list_plot of a nearly constant sequence fails,ddrake,"jason, was","At https://groups.google.com/d/topic/sage-devel/gu0Al01k-3Y/discussion I noted that list_plot/matplotlib are confused when given a nearly-constant sequence:
{{{
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]])
}}}
fails with
{{{
...
/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
}}}
(with 4.7.1 on 64-bit Linux.)

Since the usual plot() function works with constant functions, there should be a way to get this working. (Or, we should decide that this is a matplotlib bug and properly report it.)",defect,new,minor,sage-5.10,graphics,,"list_plot, matplotlib, sd40.5",novoselt,,N/A,,,,,
