Skip to content

Allow MarkerStyle instances as input for lines #16692

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
Mar 12, 2020

Conversation

ImportanceOfBeingErnest
Copy link
Member

PR Summary

scatter allows to pass a MarkerStyle instances as marker.

 plt.scatter(..., marker=MarkerStyle("D"))

plot did not allow for that up to now.

This PR fixes this, such that

plt.plot(..., marker=MarkerStyle("D"))

will work as expected.

This is leveraged by allowing MarkerStyle to take an instance of itself as input.

PR Checklist

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

@tacaswell tacaswell added this to the v3.3.0 milestone Mar 6, 2020
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.

This should get a whats_new entry ?

@ImportanceOfBeingErnest ImportanceOfBeingErnest force-pushed the marker-for-lines branch 2 times, most recently from c6840ef to 4b69a29 Compare March 6, 2020 13:45
fig.canvas.draw()
assert line.get_marker() == "D"

#continue with smoke tests:
Copy link
Member

Choose a reason for hiding this comment

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

There should be a space after #; dunno why flake8 isn't complaining.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is because E265 is ignored throughout:

E265, E266,

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.

4 participants