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
···
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: