Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change set_adjustable for share axes with aspect ratio of 1 #4725

Closed
tacaswell opened this issue Jul 17, 2015 · 6 comments
Closed

change set_adjustable for share axes with aspect ratio of 1 #4725

tacaswell opened this issue Jul 17, 2015 · 6 comments

Comments

@tacaswell
Copy link
Member

#2790 and #1325 both boiled down to the default value of ax._adjustable for shared axes with aspect ratio of 1. We should probably detect that and automatically fix it

@tacaswell tacaswell added this to the Color overhaul milestone Jul 17, 2015
@mdboom mdboom modified the milestones: Color overhaul, next major release (2.0) Oct 8, 2015
@anntzer
Copy link
Contributor

anntzer commented Nov 12, 2015

Somewhat related so I'm posting it here but I can open a separate issue if you prefer: a number of solutions simply tell to set adjustable to box-forced; while that generally works perhaps it should be documented why this is necessary? Currently the only thing I can find in the docs is

‘box’     change physical size of axes
‘datalim’     change xlim or ylim
‘box-forced’  same as ‘box’, but axes can be shared

‘box’ does not allow axes sharing, as this can cause unintended side effect. For cases when sharing axes is fine, use ‘box-forced’.

A naive reader (such as myself...) may want to ask "why isn't the default box-forced, then?"

@efiring
Copy link
Member

efiring commented Nov 12, 2015

I agree that the documentation could give more detail, or a more dramatic description, such as "...as this cannot work unless the shared axes are identical, meaning you create them with the same characteristics, and you don't try to zoom, pan, or otherwise manipulate them." I think that if you do a little testing along these lines you will see that box is fundamentally incompatible with shared axes, which is the reason box-forced is not the default. We don't want a default with bizarre behavior. Or at least I don't.

@efiring
Copy link
Member

efiring commented Nov 12, 2015

I am strongly opposed to trying to make box-forced the default under any circumstances. As far as I can see, it only works under very restrictive conditions such as an array of images of identical dimensions.

@anntzer
Copy link
Contributor

anntzer commented Nov 12, 2015

Obviously if there are restrictions on when box-forced works then it shouldn't be the default. All I'm saying is that a quite a few places mention it as "the" solution for shared axes without ever mentioning why we need to go through such contorsions.

@WeatherGod
Copy link
Member

One thing I never understood is that if the axes are shared, then don't
they by definition share the same characteristics? I honestly can't
remember situations where shared axes and 'box-forced' was a bad thing.

On Thu, Nov 12, 2015 at 1:51 AM, Antony Lee notifications@github.com
wrote:

Obviously if there are restrictions on when box-forced works then it
shouldn't be the default. All I'm saying is that a quite a few places
mention it as "the" solution for shared axes without ever mentioning why we
need to go through such contorsions.


Reply to this email directly or view it on GitHub
#4725 (comment)
.

@efiring
Copy link
Member

efiring commented Nov 12, 2015

@WeatherGod, even though I wrote the aspect-handling code, I also have a hard time remembering these things and explaining why box-forced is mostly a bad idea. I wasn't very happy about having it introduced at all. Fundamentally, shared axes and adjustable boxes are incompatible because they conflict with each other. Shared axes is saying, "keep these axes the same--same data range, and same screen range". Adjustable box is saying "change the box size (screen range) of this axis while maintaining the data range". You just can't satisfy both constraints at the same time unless the data ranges happen to be the same. So box-forced doesn't satisfy both constraints except in special cases like two images of identical array dimensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants