Discussion:
[Matplotlib-users] Insert image on current plot without deformation
Stephane Raynaud
2015-07-27 15:32:21 UTC
Permalink
Hi,

In matplotlib, what is the most appropriate way to plot an image with its
native aspect ratio, and optionally its native size, inside existing axes
at a specific data location?

For instance:

from matplotlib.pyplot import plotfrom matplotlib.image import
imreadfrom matplotlib.cbook import get_sample_data

plot([50,60],[1000,2000])
im = imread(get_sample_data("grace_hopper.png", asfileobj=False))

Now I want to plot im for instance centered at coordinates (57,1200) with
some scaling or a max height and without deformation.
Thanks for the help.
--
Stephane Raynaud
Loading...