figimage broken?

gruben@...1048...> It's possible I've done something stupid, but
    gruben@...1048...> imshow works, so I don't think so. I suspect this
    gruben@...1048...> may have been broken for a while. I haven't tried
    gruben@...1048...> 0.87.2 (because I can't be bothered with the new
    gruben@...1048...> numpy/scipy/matplotlib version interdependency).

matplotlib does not require numpy or scipy to build or run. You can
simply set 'numerix : Numeric' or 'numerix : numarray' in your rc file
and still use the same old libs you want.

So feel free to update to the latest version if you want. I will look
into the figimage problem later.

JDH

Hi John,

I've found the source of this figimage problem.
In _backend_agg.cpp RendererAgg::draw_image is expecting 4 arguments and is being passed 5 by the FigureImage draw method in image.py
The offending line is:

renderer.draw_image(self.ox, self.oy, im, self.origin, self.figure.bbox)

Changing this to

renderer.draw_image(self.ox, self.oy, im, self.figure.bbox)

solved the problem for me.

I checked and found that the RendererAgg draw_image() virtual method has 5 arguments, which seems to be the source of the problem, so either this needs changing or the backend code does.

_draw_image() in backend_agg.py makes the call with 3 arguments, so this needs fixing too.

The draw_image() method in backend_emf.py has a stub override with 5 arguments, so this may need changing too, although it isn't causing harm yet. I'm not sure all of these are real problems because I didn't try too hard to understand how the backends work.

regards,
Gary R.

John Hunter wrote:

···

    gruben@...1048...> It's possible I've done something stupid, but
    gruben@...1048...> imshow works, so I don't think so. I suspect this
    gruben@...1048...> may have been broken for a while. I haven't tried
    gruben@...1048...> 0.87.2 (because I can't be bothered with the new
    gruben@...1048...> numpy/scipy/matplotlib version interdependency).

matplotlib does not require numpy or scipy to build or run. You can
simply set 'numerix : Numeric' or 'numerix : numarray' in your rc file
and still use the same old libs you want.

So feel free to update to the latest version if you want. I will look
into the figimage problem later.

JDH