# figimages

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()

Well, it almost killed me but I finally figured out the cause of this
bug: the origin rc param was being ignored for composite images. I
fixed in r5618 this for fig and axes images.

JDH

···

On Thu, Jun 19, 2008 at 5:46 PM, John Hunter <jdh2358@...149...> wrote:

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