On Monday 29 March 2010 01:51:30 Sunman wrote:
> 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:
> but when it is not it looks like this:
> Is there any way I can line up the image for a rectangular array so that
> its in the top left corner?
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.
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 ] )
a = np.arange(35).reshape(7, 5)
ax.imshow(a, interpolation='nearest', extent=(0.0, 1.0, 0.0, 1.0),
Get latest updates about Open Source Projects, Conferences and News.