Mark Bakker wrote: > The enhanced way of handling aspect ratios that Eric implemented works > great. > There is, however, one change from the old implementation that I don't like. > > In the old implementation, when setting axis('scaled') it also turned > autoscale off. > This makes sense (and I used it a lot). It means that you can set the > axis('scaled'), which means the aspect ratios are set equal and the axis > limits are not changed, at any point when you like the data limits. The > axis limits are then fixed so that every time you add something else to > the figure it will keep these limits. > > In the new implementation (ok, it has been there for a little while > now), you have to give a separate set_autoscale_on(False) command. > Besides the odd name of the function (you actually turn the autoscale > off), it is a command that should be set right away by axis('scaled'). > If you want the autoscale to remain on, you should use axis('equal')
Here is the present code fragment (slightly mangled by the mailer): elif s in ('equal', 'tight', 'scaled', 'normal', 'auto', 'image'): self.set_autoscale_on(True) self.set_aspect('auto') self.autoscale_view() self.apply_aspect() if s=='equal': self.set_aspect('equal', adjustable='datalim') elif s == 'scaled': self.set_aspect('equal', adjustable='box', anchor='C') elif s=='tight': self.autoscale_view(tight=True) self.set_autoscale_on(False) elif s == 'image': self.autoscale_view(tight=True) self.set_autoscale_on(False) self.set_aspect('equal', adjustable='box', anchor='C') At present, the difference between "equal" and "scaled" is not the autoscale state but the "adjustable". I don't have any objection to changing the behavior of "scaled" as you suggest, if that is what people want. Alternatively, yet another word could be used to define the behavior you want, and that behavior could be added. I don't find "scaled" or "equal" very descriptive or intuitive; nor do I find that either word suggests how autoscale should be set. (And I agree, "set_autoscale_on(False)" is ugly.) Eric ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users