Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Correctly set default linewidth for unfilled markers. #17492

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2020

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented May 23, 2020

PR Summary

It should not override user-supplied linewidths.

Fixes #17192.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • [N/A] New features are documented, with examples if plot related
  • [N/A] Documentation is sphinx and numpydoc compliant
  • [N/A] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • [N/A] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@QuLogic QuLogic added this to the v3.3.0 milestone May 23, 2020
@@ -1968,6 +1968,27 @@ def get_next_color():
c=c_case, edgecolors="black", kwargs={}, xsize=xsize,
get_next_color_func=get_next_color)

@check_figures_equal(extensions=["pdf"])
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it be simpler to test path_collection.get_linewidths() on the PathCollection returned from ax.scatter() instead of an image comparison?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's a possibility. We already have plot/scatter cross-validation from test_markers.py.

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

I agree with @timhoffm that looking at get_linewidths would be simpler, but checking between plot and scatter also gives use some nice cross validation.

Leave to @QuLogic discretion to change the test or merge as-is.

@QuLogic QuLogic force-pushed the unfilled-marker-lw branch from 3526654 to 66289c4 Compare May 25, 2020 22:27
@QuLogic
Copy link
Member Author

QuLogic commented May 25, 2020

Switched to get_linewidths; cross-validation is done in test_markers.py, across more marker types and output formats, already.

@timhoffm timhoffm merged commit 51a1940 into matplotlib:master May 25, 2020
@QuLogic QuLogic deleted the unfilled-marker-lw branch May 26, 2020 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to change the thickness of the marker "x" when using scatter?
3 participants