From: John H. <jdh...@ac...> - 2005-09-02 15:40:51
|
>>>>> "Arnd" == Arnd Baecker <arn...@we...> writes: Arnd> Hi John, I looked a little bit further into this, and maybe Arnd> there is a simple solution: Arnd> In imshow (axes.py): if I comment out the lines Arnd> #corners = (xmin, ymin), (xmax, ymax) Arnd> #self.update_datalim(corners) #self.set_xlim((xmin, xmax)) Arnd> #self.set_ylim((ymin, ymax)) Arnd> it works fine for the example I sent yesterday. (only the Yes, that should read corners = (xmin, ymin), (xmax, ymax) self.update_datalim(corners) if self._autoscaleon: self.set_xlim((xmin, xmax)) self.set_ylim((ymin, ymax)) Thanks. Arnd> different behaviour when changing the order of Arnd> `axis("equal")` and `axis([-0.35,2.1,-0.2,1.25])` persists.) It is not surprising that the order makes a difference. When correcting for the aspect ratio, either the data limits, window limits, or both have to change. The default is to change the data limits, but you can control this by calling ax.set_aspect(aspect='equal', fixLimits=True) This is the function that axis('equal') calls, and by using it directly you can tweak some of the default behaviors. See the docstring for set_aspect (in CVS) for more information. This is fairly new functionality so let us know if this works for you. It might be a good idea for someone to start a wiki entry on the various issues of axes aspect ratio. JDH |