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

Skip to content

Add example to polygon selector docstring showing how to set vertices programmatically #22170

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

Conversation

ericpre
Copy link
Member

@ericpre ericpre commented Jan 9, 2022

PR Summary

Follow up of #21881.

PR Checklist

Tests and Styling

  • [n/a] Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [n/a] New features are documented, with examples if plot related.
  • [n/a] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [n/a] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

IMHO the main use case is still letting the user define the selection interactively. Setting vertices programmatically is only a secondary application. Therefore, it feels like the wrong priority to have this as the sole explicit example in the docstring.

I suggest to move this code to the example as well and introduce two sections for programmatically/interactive. As a bonus, the example would get a static figure contating a selection, which would be nice as the gallery thumbnail.

@ericpre ericpre force-pushed the add_docstring_example_polygon_selector branch 2 times, most recently from 1043571 to 4c2ddf4 Compare January 11, 2022 09:04
@ericpre ericpre force-pushed the add_docstring_example_polygon_selector branch from 4c2ddf4 to 08c438a Compare January 11, 2022 11:36
@ericpre
Copy link
Member Author

ericpre commented Jan 11, 2022

@ericpre
Copy link
Member Author

ericpre commented Jan 13, 2022

I suggest to move this code to the example as well and introduce two sections for programmatically/interactive. As a bonus, the example would get a static figure contating a selection, which would be nice as the gallery thumbnail.

Done.

@QuLogic QuLogic merged commit f35a330 into matplotlib:main Mar 15, 2022
@oscargus oscargus added this to the v3.6.0 milestone Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants