On Monday 29 March 2010 01:51:30 Sunman wrote:
> Hello,
>
> I am trying to use the imshow() function for a 2-dimensional array.
>
> However, I am having issues with the following: When the array is perfectly
> square the image looks like this:
>
> http://old.nabble.com/file/p28063442/Plot2.png
>
> but when it is not it looks like this:
> http://old.nabble.com/file/p28063442/Plot.png
>
> Is there any way I can line up the image for a rectangular array so that
> its in the top left corner?
Hi,
I'm not really sure I get your point, but you can try to play with the
placement of the used subplot
``axes(rect)`` where *rect* = [left, bottom, width, height]
in normalized (0, 1) units.
e.g.
ax = plt.axes([0.1, 0.2, 0.8, 0.6])
and with the kwargs of imshow (extent: limits of the picture and aspect : [
None | 'auto' | 'equal' | scalar ] )
e.g.
a = np.arange(35).reshape(7, 5)
ax.imshow(a, interpolation='nearest', extent=(0.0, 1.0, 0.0, 1.0),
aspect='auto', origin='lower')
Kind regards,
Matthias
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users