Hi,
Plotting some very small values (~1E-306) will break mpl with the error:
File
"/usr/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py",
line 154, in draw_text
self._renderer.draw_text_image(font.get_image(), int(x), int(y) +
1, angle, gc)
OverflowError: cannot convert float infinity to long
Very large values don't seem to be a problem and this bug seems to be
backend independent. Also, for some reason the minimum double value
representable in C and Python seem to be different... On my machine
(i686 GNU/Linux, 32 bits Debian testing) the C DBL_MIN is ~1E-308, but
Python seem to 1E-323 or so (Python 2.5.5). I'm using the latest mpl svn
(rev 8414).
Regards,
João Silva
Example script -----------------------------------------------------
import numpy as np
import matplotlib.pyplot as plt
n = 10
x = np.linspace(0.0,10.0,n)
plt.plot(x,1E-306*np.ones(n))
plt.show()
-----------------------------------------------------
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel