*True enough. But I am still unclear what it is you want to do. Do you want different x axes and different y axes.*
No, this is what I already get with frameon=False.
*Do you want the same x axes with different y axes. If the latter, you can follow the example of two_scales.py and make sure both axes have the same xlim. If the former you can set tick_top, as you are doing. Is this what you want? *
What I want is same x with different y. But I don’t want to give up autoscale. For The x axis I want the behavior to be the same as when you simply issue two plot commands on the same frame: The wider x axis sets xlim. Meanwhile, for y axes the autoscale would be done independently, as is the case with frameon=False.
To put it simply: I want a version of frameon=False that affects only the y axes, not both.
*Please feel free to submit an example :-)*
I will be more than glad to do so, when I figure out how to do it without having to set xlim manually.
*Well, in my defense, I have given you the axes command which lets you place axes wherever you want. The subplot command is a simple subclass of axes that lays out the axes like matlab's subplot. So it would be a bad idea, in my opinion, to make them behave differently.*
I think that the default behavior of subplot should stay the same. This extra feature could be a flag of the type: share_x_axis=True or False (the same for y).
* It would be nice, I agree, to proved a new function to support axes layout for aligning axes with shared borders, that automatically did the right thing in terms of turning off tick labels except on the margins, etc. Something like # 2x2 with shared borders in the middle a11, a12, a21, a22 = shared_axes(2,2) # 1x2 with shared y axis in the middle. Only a11 has y tick labels a11, a12 = shared_axes(1,2) # 2x1 with shared x axis in the middle. Only a21 has x tick labels a11, a21 = shared_axes(2,1) and so on. The only difficult part would be in deciding how scaling events in one axes affect others.*
That’s also a good way to do it. Scaling should be done, for the axis that is not being shared, the same way as if the two or more plots had been plotted in the same frame. That would need implementing independent autoscaling for each axis, as I mentioned for the two-scale plot.
Flávio Codeço Coelho, PhD
Programa de Computação Científica
Fundação Oswaldo Cruz
Rio de Janeiro – Brasil
···
On Thu, 2004-06-03 at 19:14, John Hunter wrote: