The solution is already the aspect='auto', ie: import numpy as np from matplotlib import pyplot as plt a = np.arange(100).reshape(10,10) plt.imshow(a, aspect='auto')
aspect='auto' is what you were looking for, the documentation (as you probably already found is for example at: http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow or in interactive help. On Sun, 2011-04-17 at 23:16 +0200, Paolo Zaffino wrote: > Thanks for the reply. > I checked in the help...I didn't understand what I must to use. > Should you post me the link of the guide of this setting? > Thanks! > > > Il 16/04/2011 10:47, Sebastian Berg ha scritto: > > Hello, > > > > check the help ;). you can set aspect='auto' or something fixed. > > > > Regards, > > > > Sebastian > > > > On Sat, 2011-04-16 at 10:43 +0200, Paolo Zaffino wrote: > >> Hi at all, > >> I have a numpy matrix (an image) and I'd like to show it. > >> I thought to use show function, but I have a question. > >> I don't want that the pixel have dimension 1x1 unit but I want for > >> example 1X1.5 unit (I don't want a square but a rectangle). > >> How can I do this? > >> Thanks in advance. > >> Paolo > >> > >> ------------------------------------------------------------------------------ > >> Benefiting from Server Virtualization: Beyond Initial Workload > >> Consolidation -- Increasing the use of server virtualization is a top > >> priority.Virtualization can reduce costs, simplify management, and improve > >> application availability and disaster protection. Learn more about boosting > >> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > >> _______________________________________________ > >> Matplotlib-users mailing list > >> Matplotlib-users@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >> > > > > > > ------------------------------------------------------------------------------ > > Benefiting from Server Virtualization: Beyond Initial Workload > > Consolidation -- Increasing the use of server virtualization is a top > > priority.Virtualization can reduce costs, simplify management, and improve > > application availability and disaster protection. Learn more about boosting > > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > > _______________________________________________ > > Matplotlib-users mailing list > > Matplotlib-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users