disabling autoscaling

Well, difficult to estimate from my side, as I don't know

    > how much extra code it would be.
    >> From a (=my) user perspective I think it would be nice,
    > because I have a couple of situations where one plot should
    > stay with the same range in x and y whereas another plot
    > next to it should autoscale.

Perhaps then the best solution is just to expose that property (and
all other axes properties) in the subplot and axes functions. This
seems like the cleanest, easiest implementation to me. I just checked
this into CVS (axes.py revision 1.112).

So you can do, eg,

   subplot(111, autoscale_on=False)

As usual, you get a quick synopsis of settable props, you can do

In [2]: ax = gca()

In [3]: setp(ax)
    alpha: float
    autoscale_on: True|False
    axis_bgcolor: any matplotlib color - see help(colors)
    axis_off: void
    axis_on: void
    clip_box: a matplotlib.transform.Bbox instance
    clip_on: [True | False]
    cursor_props: a (float, color) tuple
    figure: a Figure instance
    frame_on: True|False
    label: any string
    lod: [True | False]
    position: len(4) sequence of floats
    title: str
    transform: a matplotlib.transform transformation instance
    visible: [True | False]
    xlabel: str
    xlim: len(2) sequence of floats
    xscale: str
    xticklabels: sequence of strings
    xticks: sequence of floats
    ylabel: str
    ylim: len(2) sequence of floats
    yscale: str
    yticklabels: sequence of strings
    yticks: sequence of floats
    zorder: any number

Thus you can do now do fun things like

  subplot(111, xlabel='time', ylabel='volts', autoscale_on=False,
          xlim=(-1,1), ylim =(0,10) )

Very nice!
JDH

    > Well, difficult to estimate from my side, as I don't know
    > how much extra code it would be.
    >> From a (=my) user perspective I think it would be nice,
    > because I have a couple of situations where one plot should
    > stay with the same range in x and y whereas another plot
    > next to it should autoscale.

Perhaps then the best solution is just to expose that property (and
all other axes properties) in the subplot and axes functions. This
seems like the cleanest, easiest implementation to me. I just checked
this into CVS (axes.py revision 1.112).

[...]

Thus you can do now do fun things like

  subplot(111, xlabel='time', ylabel='volts', autoscale_on=False,
          xlim=(-1,1), ylim =(0,10) )

Very nice!

Indeed, I just updated from CVS, works absolutely fine!
*Many* thanks!!!

Best,

Arnd

···

On Mon, 13 Jun 2005, John Hunter wrote:

Hello John,

So you can do, eg,

   subplot(111, autoscale_on=False)

I notice that this gets turned off by cla():
the script

    from pylab import *

    figure()
    subplot(111, autoscale_on=False, xlim=(-1.5,1.5), ylim =(-1.5,1.5))
    ax=gca()
    print ax.get_autoscale_on()

    cla()
    ax=gca()
    print ax.get_autoscale_on()

prints

    False
    True

Is this expected behaviour or a bug?

All the best,
Jochen

···

On Mon, Jun 13, 2005 at 12:29:47PM -0500, John Hunter wrote:
--