Mark Bakker wrote:
Yeah, I agree. The words ‘equal’ is confusing. But it was taken from
matlab. ‘scaled’ was my invention/doing. I thought it was better than
‘equal’, as it makes the scales equal on both axes. Either way, I would
like it if we can fix the data limits in a simple way, and I think
incorporating it in ‘scaled’ would be one option. A new option would be
a good idea too. Something like ‘scaledfixed’ ? Maybe too long. Or just
‘scaledf’ ? Code is simple:
elif s == 'scaledf':
self.set_aspect('equal', adjustable='box', anchor='C')
No one else said anything about this, so I suspect that you may be the
only person using ‘scaled’ now. Given that you invented it, and that it
was present for a while in your original form, I decided to simply
restore it to that rather than to introduce another option. There are
potentially too many combinations to have a short name for each.
This is not irrevocable, of course.
I had to make a slight change in apply_aspect so that toggling back and
forth between this version of scaled and equal would work; I hope that
hasn’t fouled up anything else. I think it should be OK.
On 1/3/07, Eric Firing < > efiring@…202… > > mailto:efiring@...202...> wrote:
Mark Bakker wrote:
> The enhanced way of handling aspect ratios that Eric implemented
> There is, however, one change from the old implementation that I
> In the old implementation, when setting axis('scaled') it also
> 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
> limits are not changed, at any point when you like the data
> axis limits are then fixed so that every time you add something
> 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
> 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',
elif s == 'scaled':
elif s == 'image':
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.)