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

Cleanup tripcolor()#22356

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
QuLogic merged 3 commits intomatplotlib:mainfromtimhoffm:triplot
Mar 29, 2022
Merged

Cleanup tripcolor()#22356

QuLogic merged 3 commits intomatplotlib:mainfromtimhoffm:triplot
Mar 29, 2022

Conversation

timhoffm
Copy link
Member

@timhoffmtimhoffm commentedJan 29, 2022
edited
Loading

PR Summary

Commits:

  • RewriteTriangulation.get_from_args_and_kwargs to make parameter parsing testable; and add tests.
  • Warn when passingtriangles ormask alongside aTriangulation totripcolor()
  • Cleanup logic and documentation oftripcolor()
    This issues additional warnings and more precise error messages but does not change behavior.
    The only "semantic" change is that I have discouraged passingtriangles positionally:tripcolor(x, y, triangles, C)
    is a bit odd and IMHO has too many positional arguments.

Closes#22303. Follows up on#10148.

@timhoffmtimhoffmforce-pushed thetriplot branch 3 times, most recently from382eca7 toa8b9429CompareJanuary 29, 2022 23:31
@timhoffmtimhoffm changed the titleTriplotCleanup tripcolor()Jan 29, 2022
@timhoffmtimhoffm added this to thev3.6.0 milestoneJan 29, 2022

collection = PolyCollection(verts, **kwargs)

collection.set_alpha(alpha)
collection.set_array(C)
collection.set_array(colors)
Copy link
Contributor

Choose a reason for hiding this comment

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

While you're at it, probably kwargs should be set last, for the same reason as in#21146/#21525?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

But there iscollection._scale_norm(norm, vmin, vmax) after setting the norm here. AFAICS this handles the issue in#21146/#21525. One can probably remove that when delaying kwargs setting. But since this PR is already complicated enough and there is no immediate problem, I'd not go into this within this PR.

@timhoffmtimhoffmforce-pushed thetriplot branch 2 times, most recently frombe7e1e2 toef81739CompareMarch 27, 2022 07:50
This issues more and more precise warnings on usage errors but does notchange behavior.Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
@QuLogicQuLogic merged commitdfd83c2 intomatplotlib:mainMar 29, 2022
@QuLogic
Copy link
Member

Oops, thought there was a second review; hope you're okay with this@anntzer?

@anntzer
Copy link
Contributor

No worries, opened#22726 to track the rest.

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

@anntzeranntzeranntzer left review comments

@QuLogicQuLogicQuLogic approved these changes

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

Successfully merging this pull request may close these issues.

[Bug]: Args for tripcolor
3 participants
@timhoffm@QuLogic@anntzer

[8]ページ先頭

©2009-2025 Movatter.jp