Bug in view interval for matplotlib 0.7.2

The following code in matplotlib.ticker has a bug:

730 def scale_range(vmin, vmax, n = 1, threshold=100):
731 dv = abs(vmax - vmin)
732 meanv = 0.5*(vmax+vmin)
733 B-> var = dv/max(abs(vmin), abs(vmax))
734 if var < 1e-12:
735 return 1.0, 0.0
736 if abs(meanv)/dv < threshold:
737 offset = 0
738 elif meanv > 0:

When both dmin and dmax are 0 it results in 0 division. I have been
unable to write a snippet of code to reproduce the problem
unfortunately.

I was able to work around the error simply by doing the obvious,
making var = 0 if max(abs(vmin), abs(vmax)). I think someone who
understood the code better could probably come up with a better
solution.

--Tom