Assuming this is a bug, not a feature:
sage: plot(1/x,0,1)
<boom>
My feeling is this should plot okay, since there is only one "bad"
point and the plotting code handles that kind of thing.
As far as I can tell from the traceback (relevant appended), the
problem is in the axes, which convert (at least when using
_tasteful_ticks) the endpoints to integers, given a big enough range.
sage: plot(1/x,0,1)
---------------------------------------------------------------------------
OverflowError Traceback (most recent call
last)
/Applications/sage/local/lib/python2.5/site-packages/sage/plot/plot.py
in _repr_(self)
738 """
739 if SHOW_DEFAULT:
--> 740 self.show()
741 return ''
742 else:
/Applications/sage/local/lib/python2.5/site-packages/sage/plot/plot.py
in show(self, xmin, xmax, ymin, ymax, figsize, filename, dpi, axes,
axes_labels, frame, fontsize, aspect_ratio)
1252 axes_labels=axes_labels,
1253 frame=frame, fontsize=fontsize,
-> 1254 aspect_ratio=aspect_ratio)
1255 os.system('%s %s 2>/dev/null 1>/dev/null &'%
(sage.misc.viewer.browser(), filename))
1256
/Applications/sage/local/lib/python2.5/site-packages/sage/plot/plot.py
in save(self, filename, xmin, xmax, ymin, ymax, figsize, figure, sub,
savenow, dpi, axes, axes_labels, fontsize, frame, verify,
aspect_ratio)
1429 xmin,xmax,ymin,ymax = self._prepare_axes(xmin,
xmax, ymin, ymax)
1430
-> 1431 xmin, xmax, ymin, ymax =
sage_axes.add_xy_axes(subplot, xmin, xmax, ymin, ymax)
1432
1433 subplot.set_xlim(xmin, xmax)
/Applications/sage/local/lib/python2.5/site-packages/sage/plot/axes.py
in add_xy_axes(self, subplot, xmin, xmax, ymin, ymax, axes, ticks,
axesstyle, axes_labels)
324
325 #evalute find_axes for y values and x ticks
--> 326 x_axis_ypos, ystep, ytslminor, ytslmajor =
self._find_axes(ymin, ymax)
327 xltheight = 0.015*yspan
328 xstheight = 0.25*xltheight
/Applications/sage/local/lib/python2.5/site-packages/sage/plot/axes.py
in _find_axes(self, minval, maxval)
240 tslmajor, oppaxis, step =
self._tasteless_ticks(minval, maxval, 10)
241 else:
--> 242 tslmajor, oppaxis, step =
self._tasteful_ticks(minval, maxval)
243 min = tslmajor[0] - step
244 tslminor = sage.misc.misc.srange(min, maxval +
0.2*step, 0.2*step)
/Applications/sage/local/lib/python2.5/site-packages/sage/plot/axes.py
in _tasteful_ticks(self, minval, maxval)
124 else:
125 if maxval >= 10:
--> 126 sl = [s for s in str(int(absmax))]
127 d0 = eval(sl[0])
128 d1 = eval(sl[1])
OverflowError: cannot convert float infinity to long