I believe there is a bug in the figimage handling when multiple images
are present.  It looks like there is a negative sign in the
transformation that shouldn't be there.  It is common to get upside
down in mpl, since bottom is 0 for us and usually bottom is top

Uncomment out the second figimage call to see the problem in the example below::

import numpy as np
import matplotlib.mathtext as mathtext
import matplotlib.pyplot as plt

parser = mathtext.MathTextParser("Bitmap")

parser.to_png('test2.png',
r'$\left[\left\lfloor\frac{5}{\frac{\left(3\right)}{4}}
y\right)\right]$', color='green', fontsize=14, dpi=100)


rgba1, depth1 = parser.to_rgba(r'IQ: $\sigma_i=15$', color='blue',
fontsize=20, dpi=200)
rgba2, depth2 = parser.to_rgba(r'some other string', color='red',
fontsize=20, dpi=200)

fig = plt.figure()
fig.figimage(rgba1.astype(float)/255., 100, 100)
#ig.figimage(rgba2.astype(float)/255., 100, 300)

plt.show()

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to