From: Eric F. <ef...@ha...> - 2009-10-05 03:45:14
|
Jason Sewall wrote: > While I'm at it, I might as well as about image dimensions vs. axes limits. > > If I change ax.axis('equal') manually to the correct bounding box of > the visible stuff (i.e. ax.axis([1.25, 5, 0, 6])), I then get an image > that is distorted, presumably to fit some pre-set aspect ratio. Is > there a way to fix this, too? I guess what I'd like is a way to say: > "When you save or render this image, set the output image dimensions > to be appropriate to aspect ratio x (usually 1:1 for me) and the > current axis setting" Use the Axes.set_aspect() method for full control of the aspect ratio, and of what gets changed to preserve that aspect ratio. Eric > > I've used matplotlib for more than a few projects, but this aspect of > it has eluded me. > > Thanks for all your help, > Jason |