Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## [Matplotlib-users] image rescale on intervall

 [Matplotlib-users] image rescale on intervall From: jonasr - 2012-02-27 12:16:51 ```Hello, i am actually trying to plot a vector field over a scalar field, i want to show a vector field on the intervall x=[0,1] y=[0,1] this works fine so far, actually i have the problem that if i plot the scalarfield via imshow() the image geht scaled by the size of the array. i.e. if i have a 100x100 array the image is drawn on an [0,100] intervall, is there any possibility to bring the image down to an [0,1 ] intevall independent of the array size ? thanks -- View this message in context: http://old.nabble.com/image-rescale-on-intervall-tp33399314p33399314.html Sent from the matplotlib - users mailing list archive at Nabble.com. ```

 [Matplotlib-users] image rescale on intervall From: jonasr - 2012-02-27 12:16:51 ```Hello, i am actually trying to plot a vector field over a scalar field, i want to show a vector field on the intervall x=[0,1] y=[0,1] this works fine so far, actually i have the problem that if i plot the scalarfield via imshow() the image geht scaled by the size of the array. i.e. if i have a 100x100 array the image is drawn on an [0,100] intervall, is there any possibility to bring the image down to an [0,1 ] intevall independent of the array size ? thanks -- View this message in context: http://old.nabble.com/image-rescale-on-intervall-tp33399314p33399314.html Sent from the matplotlib - users mailing list archive at Nabble.com. ```
 Re: [Matplotlib-users] image rescale on intervall From: John Hunter - 2012-02-27 13:00:19 ``` On Feb 27, 2012, at 6:16 AM, jonasr wrote: > > Hello, > > i am actually trying to plot a vector field over a scalar field, > i want to show a vector field on the intervall x=[0,1] y=[0,1] > this works fine so far, actually i have the problem that if i plot the > scalarfield > via imshow() the image geht scaled by the size of the array. > i.e. if i have a 100x100 array the image is drawn on an [0,100] intervall, > is there any possibility to bring the image down to an [0,1 ] intevall > independent of the array size ? Take a look at the extent argument to imshow. http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow You want something like extent=[0,1,0,1] ```