Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added share_tickers parameter to axes._AxesBase.twinx/y#10960

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

dstansby
Copy link
Member

This is my attempt to resurrect#7528, whichfixes#7376.

@dstansbydstansby added this to thev3.0 milestoneApr 5, 2018
@dstansbydstansby changed the titleENH: Added share_tickers parameter to axes._AxesBase.twinx/yAdded share_tickers parameter to axes._AxesBase.twinx/yApr 5, 2018
@jklymak
Copy link
Member

Can you provide an example as well? I finally parsed why we would want this from the original issue, and I think it’d be a helpful example to have.

I guess I’m also still concerned that@efiring issue with the locator being different is still valid because the locator also returns the autolims. Which locator wins if the locators are different? This should be consistent and documented.

@efiring
Copy link
Member

Given the warning of possible dire consequences, why do this at all? I think this is simply a bad idea, short of a total overhaul of the way we track and determine axis limits.

@jklymak
Copy link
Member

I think it’s a useful idea to have a second scale for the same axis, which i think was the original idea. But I’m not at all sure this is the best way to do it.

@dstansby
Copy link
MemberAuthor

My personal example, is I have a timeseries data, on two shared x-axis. I want to put timestamps on one of the axis labels, but want to format the second axis labels a different way (but still have them linked, so when I drag or zoom one the other drags/zooms too).

I don't think this is a bad idea at all in theory - the location of data on the graph is independent of the ticks and labels above. I'll have a proper look at the autoscaling worries soon.

@dstansby
Copy link
MemberAuthor

(at least as a minimum being able to set different formatters would be good if setting different locators is a problem.)

@dstansby
Copy link
MemberAuthor

To record my findings, the way I thinkautoscale_view works is:

  1. Callautoscale_view on a single axis (I don't think it's possible to call it on a shared set)
  2. Work out the data limits from all the current axis and all of its shared axis'
  3. Using these data limts, let the locator of thecurrent axis determine the final view limits

So I don't think having different locators is a problem code wise - there might just be different results depending on which axis is autoscaled, even if they are twinned. Would that be a problem?

@jklymak
Copy link
Member

This and#10961 are almost the same thing....

Copy link
Member

@efiringefiring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

As with#1061, I don't think this is a good approach. I will try to come up with an alternative this weekend.

@dstansby
Copy link
MemberAuthor

Okay, I'll close this in favour of discussion on#10976, thanks for taking the time to look over this!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@efiringefiringefiring requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.0.0
Development

Successfully merging this pull request may close these issues.

Twinned axes do not allow setting of different formatters
4 participants
@dstansby@jklymak@efiring@madphysicist

[8]ページ先頭

©2009-2025 Movatter.jp