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

HostAxesBase now adds appropriate _remove_method to its parasite axes.#4898

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

Conversation

smheidrich
Copy link
Contributor

Fix for#4896 .
I think this should do the trick.

@tacaswell
Copy link
Member

Can you also add tests and awhat_new entry?

@tacaswelltacaswell added this to theproposed next point release milestoneAug 11, 2015
@smheidrich
Copy link
ContributorAuthor

Hmm there seems to be a problem with removingtwinx andtwiny axes where the lines and ticks remain, only the numbers disappear. Will look into this later.

@smheidrich
Copy link
ContributorAuthor

Ok it's because thetwin* methods also screw with the host axes' visibility settings. I don't know if and how this should be fixed.

@smheidrich
Copy link
ContributorAuthor

Are you sure you want awhats_new entry for this? Seems like more of a minor bug fix than something worth mentioning there...

@tacaswell
Copy link
Member

I like to advertise when we add long standing missing functionality.

It also serves as advertisement that the remove functionality exists on all
of the other artists.

If you don't want to do it i will leave it to your judgement.

On Tue, Aug 11, 2015, 7:01 PM productivememberofsociety666 <
notifications@github.com> wrote:

Are you sure you want a whats_new entry for this? Seems like more of a
minor bug fix than something worth mentioning there...


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

@tacaswell
Copy link
Member

Could you reduce the tests to only having pngs ?

@smheidrich
Copy link
ContributorAuthor

I'm trying to understand what the point is behind the host axes' visibility settings being changed by thetwin* functions. Here is what it looks like if I just set them all to invisible:
twin_axes_empty_and_removed
So the removal code works at least, but thetwin* functions seem a bit inconsistent:twinx andtwiny set their lines invisible and show only the ticks and numbers, whereastwin has everything visible.

@smheidrich
Copy link
ContributorAuthor

Regarding the failing build, I don't know why the pictures aren't close. It works on my machine with all Python versions from 2.6 to 3.4. Fonts maybe?

@tacaswell
Copy link
Member

Make sure that you don't have any funny rcparams set (which should not
matter as the testsshould be overriding that).

Also check what version of freetype you have installed against what is on
travis.

On Wed, Aug 12, 2015 at 6:33 PM productivememberofsociety666 <
notifications@github.com> wrote:

Regarding the failing build, I don't know why the pictures aren't close.
It works on my machine with all Python versions from 2.6 to 3.4. Fonts
maybe?


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

@tacaswell
Copy link
Member

Can you also squash this down to remove the un-used images from the history? Part of the goal is to keep the size of the repository down.

@smheidrichsmheidrichforce-pushed theadd_remove_to_axes_grid1_twin_axes branch 2 times, most recently fromfc5241b to1910487CompareAugust 12, 2015 23:32
@smheidrich
Copy link
ContributorAuthor

All right I took out an rcparam that set the backend to GTK3 and uploaded a slightly modified image. Now apparently all builds work except that 2.7 one due to another test failing...

@QuLogic
Copy link
Member

Your first few commits were made without setting your author info; you should update them for reasonable attribution.

@smheidrichsmheidrichforce-pushed theadd_remove_to_axes_grid1_twin_axes branch from1910487 to9c24d49CompareAugust 13, 2015 10:05
@smheidrich
Copy link
ContributorAuthor

Build passes now although I didn't change anything. The test that failed and then magically worked wasmathfont_stix_53 intest_mathext, seehttps://travis-ci.org/matplotlib/matplotlib/jobs/75359652.

@smheidrichsmheidrichforce-pushed theadd_remove_to_axes_grid1_twin_axes branch from9c24d49 toe89181dCompareAugust 13, 2015 10:39
@tacaswell
Copy link
Member

There is a race condition in the math text rendering tests that
intermittently fails.

On Thu, Aug 13, 2015, 6:35 AM productivememberofsociety666 <
notifications@github.com> wrote:

Build passes now although I didn't change anything. The test that failed
and then magically worked was mathfont_stix_53 in test_mathext, see
https://travis-ci.org/matplotlib/matplotlib/jobs/75359652.


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

@tacaswell
Copy link
Member

I think the reason that thetwin* functions mess with the visibility is to prevent any artifacts from rendering nominally identical artists (the ticks) on top of each other.

I think that this remove behavior should also restore the visibility settings of the host axes.

Can you also check if the twin functions mutate any other data structures in the axes (I know the normalaxes.Axes.twin* methods do)? That should probably be un-done as well.

@smheidrich
Copy link
ContributorAuthor

I extended the tests to show better what is going on. Here is what things look like with the currenttwin* functionality:
old twin_axes_empty_and_removed
Like I already said, there is inconsistency between thetwinx/twiny methods and the baretwin method (axis line visibility).

In my opinion, it would be better if all methods behaved liketwin, i.e. make corresponding host axes completely invisible. The last commit contains code that does just that and also makes the_remove_method reverse these changes. Here is what things look like then:
twin_axes_empty_and_removed

As for your question, I haven't seen any other changes being made to the host axes by thetwin* functions.

@tacaswell
Copy link
Member

Awesome 👍

Thanks for wading into this!

I am not going to hold 1.5 for this PR, but have no problem with it sneaking in (it is far less disruptive than other open PRs).

@smheidrichsmheidrichforce-pushed theadd_remove_to_axes_grid1_twin_axes branch fromc8f67b6 to51d49beCompareAugust 14, 2015 18:03
@mdboom
Copy link
Member

Looks like a great bugfix. Looks like this needs a rebase, then another run through Travis, but then I'm happy to merge.

@smheidrichsmheidrichforce-pushed theadd_remove_to_axes_grid1_twin_axes branch from51d49be to0183a67CompareOctober 8, 2015 20:16
@smheidrichsmheidrichforce-pushed theadd_remove_to_axes_grid1_twin_axes branch from0183a67 to0fa9e74CompareOctober 8, 2015 20:26
@smheidrichsmheidrichforce-pushed theadd_remove_to_axes_grid1_twin_axes branch 4 times, most recently from9146ab3 to4760c14CompareOctober 15, 2015 15:00
@smheidrichsmheidrichforce-pushed theadd_remove_to_axes_grid1_twin_axes branch from4760c14 tod268abfCompareOctober 15, 2015 15:01
@smheidrich
Copy link
ContributorAuthor

Rebase done!

mdboom added a commit that referenced this pull requestOct 15, 2015
…_to_axes_grid1_twin_axesHostAxesBase now adds appropriate _remove_method to its parasite axes.
@mdboommdboom merged commite7e8bcb intomatplotlib:masterOct 15, 2015
smheidrich added a commit to smheidrich/matplotlib that referenced this pull requestJan 3, 2019
PRmatplotlib#4898 changed the behavior of twinx() and twiny() in axes_grid1 tomake them consistent with twin(). This commit inverts the "direction" ofconsistency and makes twin() behave like the pre-matplotlib#4898 twinx() andtwiny() instead. This way, the API becomes less surprising: instead ofhiding certain host axes, twin* now keeps the host axes unmodified,while the parasite axes have their axis lines hidden instead.Unfortunately, this change breaks backwards-compatibility for coderelying on the specifics of host and parasite axes visibility.Helps withmatplotlib#10748.
smheidrich added a commit to smheidrich/matplotlib that referenced this pull requestJan 3, 2019
PRmatplotlib#4898 changed the behavior of twinx() and twiny() in axes_grid1 tomake them consistent with twin(). This commit inverts the "direction" ofconsistency and makes twin() behave like the pre-matplotlib#4898 twinx() andtwiny() instead. This way, the API becomes less surprising: instead ofhiding certain host axes, twin* now keeps the host axes unmodified,while the parasite axes have their axis lines hidden instead.Unfortunately, this change breaks backwards-compatibility for coderelying on the specifics of host and parasite axes visibility.Helps withmatplotlib#10748.
smheidrich added a commit to smheidrich/matplotlib that referenced this pull requestJan 3, 2019
PRmatplotlib#4898 changed the behavior of twinx() and twiny() in axes_grid1 tomake them consistent with twin(). This commit inverts the "direction" ofconsistency and makes twin() behave like the pre-matplotlib#4898 twinx() andtwiny() instead. This way, the API becomes less surprising: instead ofhiding certain host axes, twin* now keeps the host axes unmodified,while the parasite axes have their axis lines hidden instead.Unfortunately, this change breaks backwards-compatibility for coderelying on the specifics of host and parasite axes visibility.Helps withmatplotlib#10748.
smheidrich added a commit to smheidrich/matplotlib that referenced this pull requestJan 4, 2019
PRmatplotlib#4898 changed the behavior of twinx() and twiny() in axes_grid1 tomake them consistent with twin(). This commit inverts the "direction" ofconsistency and makes twin() behave like the pre-matplotlib#4898 twinx() andtwiny() instead. This way, the API becomes less surprising: instead ofhiding certain host axes, twin* now keeps the host axes unmodified,while the parasite axes have their axis lines hidden instead.Unfortunately, this change breaks backwards-compatibility for coderelying on the specifics of host and parasite axes visibility.Helps withmatplotlib#10748.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v2.1
Development

Successfully merging this pull request may close these issues.

4 participants
@smheidrich@tacaswell@QuLogic@mdboom

[8]ページ先頭

©2009-2025 Movatter.jp