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

Ignore pos in StrCategoryFormatter.__call__ to display correct label in the preview window#16006

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

Merged

Conversation

sujanasowrirajan
Copy link
Contributor

@sujanasowrirajansujanasowrirajan commentedDec 22, 2019
edited
Loading

Fixes#14881

The positionpos in__call__ can be ignored as the tick label is independent of position. So,__call__(value, None) would return a category label even ifpos isNone, which is the expected behavior.

The test case has been modified to pass only a single argument (sopos defaults toNone).

Copy link
Member

@dstansbydstansby left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! This looks good to me, would be good to add another test as I've suggested.

assert ax.yaxis.major.formatter(i+1, i+1) == ""
assert ax.yaxis.major.formatter(0, None) == ""
assert ax.yaxis.major.formatter(i) == d
assert ax.yaxis.major.formatter(i+1) == ""
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a test thatax.yaxis.major.formatter(i, None) givesd as the label? (which it wouldn't do before this fix)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Thanks, I have updated the test.

@dstansbydstansby added this to thev3.1.3 milestoneDec 23, 2019
@anntzeranntzer modified the milestones:v3.1.3,v3.2.0Jan 2, 2020
@anntzer
Copy link
Contributor

anntzer commentedJan 2, 2020
edited
Loading

Thanks :)
I think this can go to 3.2 as a new feature, feel free to backport if you disagree.

@anntzeranntzer merged commit44ccb0e intomatplotlib:masterJan 2, 2020
@lumberbot-app
Copy link

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
$ git checkout v3.2.x$ git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
$ git cherry-pick -m1 44ccb0ef499bde61326faafc063c8141cf00bf67
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
$ git commit -am 'Backport PR #16006: Ignore pos in StrCategoryFormatter.__call__ to display correct label in the preview window '
  1. Push to a named branch :
git push YOURFORK v3.2.x:auto-backport-of-pr-16006-on-v3.2.x
  1. Create a PR against branch v3.2.x, I would have named this PR:

"Backport PR#16006 on branch v3.2.x"

And apply the correct labels and milestones.

Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon!

If these instruction are inaccurate, feel free tosuggest an improvement.

tacaswell pushed a commit to tacaswell/matplotlib that referenced this pull requestFeb 16, 2020
…ll__ to display correct label in the preview windowIgnore pos in StrCategoryFormatter.__call__ to display correct… (matplotlib#16006)Ignore pos in StrCategoryFormatter.__call__ to display correct label in the preview windowConflicts:lib/matplotlib/tests/test_category.py         - collision with py2 removal work (_to_str)
dstansby added a commit that referenced this pull requestFeb 17, 2020
…-v3.2.xBackport PR#16006: Ignore pos in StrCategoryFormatter.__call__ to di…
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@anntzeranntzeranntzer approved these changes

@dstansbydstansbydstansby approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.2.0
Development

Successfully merging this pull request may close these issues.

Categoricals not showing up in the preview window
4 participants
@sujanasowrirajan@anntzer@dstansby@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp