imshow with axes like contour

Jo?o> Christian Kristukat wrote:
    >> Hi, is it possible to have an image map (imshow) with real axes
    >> like those created by 'contour' when supplying a xy meshgrid?
    >> The pcolor command unfortunately doesn't do interpolation.
    >> Regards, Christian

You can use set the coordinates of the image data using the extent
kwarg. Among other things, this lets you plot image data with other
data (eg line data). See examples/image_demo2.py.

    Jo?o> This would be useful for me too, as I need to display an
    Jo?o> imshow with nonuniform axes.

This is not possible. image data, by definition, is regularly
sampled. At least it is in matplotlib. However, supporting
interpolation and gouraud shading over patches (eg rectangles) is
becoming an increasing priority (in particular to support John
Porter's recent 3D surface plot work) so hopefully we'll have this
feature for pcolor soon.

JDH

John Hunter wrote:

"João" == João Luís Silva <rom16384@...9...> writes:

    > Christian Kristukat wrote:
    >> Hi, is it possible to have an image map (imshow) with real axes
    >> like those created by 'contour' when supplying a xy meshgrid?
    >> The pcolor command unfortunately doesn't do interpolation.
    >> Regards, Christian

You can use set the coordinates of the image data using the extent
kwarg. Among other things, this lets you plot image data with other
data (eg line data). See examples/image_demo2.py.

Thanks. I did not understand the meaning of 'extent'.

Another thing I could not find which is probably possible as well:
How can I display a label for the colorbar (not ticklabel)?

Regards, Christian

John Hunter wrote:

"João" == João Luís Silva <rom16384@...9...> writes:

    > Christian Kristukat wrote:
    >> Hi, is it possible to have an image map (imshow) with real axes
    >> like those created by 'contour' when supplying a xy meshgrid?
    >> The pcolor command unfortunately doesn't do interpolation.
    >> Regards, Christian

You can use set the coordinates of the image data using the extent
kwarg. Among other things, this lets you plot image data with other
data (eg line data). See examples/image_demo2.py.

Thanks. I did not understand the meaning of 'extent'.

Another thing I could not find which is probably possible as well:
How can I display a label for the colorbar (not ticklabel)?

Regards, Christian