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

FIX: unit-convert pcolorargs before interpolating#18549

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

jklymak
Copy link
Member

@jklymakjklymak commentedSep 23, 2020
edited
Loading

PR Summary

Closes#18547

Forpcolor(mesh) the new "nearest" interpolation was being done before unit conversion, so datetime (for instance) did not work. This moves unit conversion inside_pcolorargs.

fromdatetimeimportdatetimefrommatplotlibimportpyplotaspltx_coords= [datetime.fromtimestamp(x*3600)forxinrange(24)]y_coords= [*range(0,10)]plt.pcolormesh(x_coords,y_coords, [[*range(24)]for_inrange(10)],shading="nearest")plt.show()

failed before, and works now...

PR Checklist

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (runflake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • Conforms to Matplotlib style conventions (installflake8-docstrings andpydocstyle<4 and runflake8 --docstring-convention=all).
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).

@jklymakjklymakforce-pushed thefix-pcolorarg-convert-before-interp branch fromd471a21 to9a1af30CompareSeptember 23, 2020 13:57
@jklymakjklymak added this to thev3.3.3 milestoneSep 23, 2020
@jklymakjklymakforce-pushed thefix-pcolorarg-convert-before-interp branch from7c0711c to9474ee6CompareSeptember 23, 2020 14:39
@jklymakjklymakforce-pushed thefix-pcolorarg-convert-before-interp branch from9474ee6 to75097a2CompareSeptember 23, 2020 14:44
@jklymakjklymak marked this pull request as ready for reviewSeptember 23, 2020 15:11
@tacaswelltacaswell merged commita010c54 intomatplotlib:masterSep 23, 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.3.x$ git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
$ git cherry-pick -m1 a010c54a5943bb5d7cd9f2dcae74217658025461
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
$ git commit -am 'Backport PR #18549: FIX: unit-convert pcolorargs before interpolating'
  1. Push to a named branch :
git push YOURFORK v3.3.x:auto-backport-of-pr-18549-on-v3.3.x
  1. Create a PR against branch v3.3.x, I would have named this PR:

"Backport PR#18549 on branch v3.3.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.

@jklymak
Copy link
MemberAuthor

I can do the back port. Its a bit of a PITA because we changed the unit handling for 3.4 but not 3.3.x....

@jklymakjklymak deleted the fix-pcolorarg-convert-before-interp branchSeptember 23, 2020 18:19
jklymak pushed a commit to jklymak/matplotlib that referenced this pull requestSep 23, 2020
…t-before-interpFIX: unit-convert pcolorargs before interpolating
@jklymakjklymak mentioned this pull requestSep 23, 2020
7 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@dopplershiftdopplershiftdopplershift approved these changes

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

Successfully merging this pull request may close these issues.

pcolormesh x-axis with datetime broken for nearest shading
4 participants
@jklymak@tacaswell@dopplershift@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp