Skip to content
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

ENH: errorbar in qt figureoptions #18650

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

@andyfaff
Copy link
Contributor

@andyfaff andyfaff commented Oct 4, 2020

PR Summary

I'd like to change various properties of an errorplot using a Qt figureoptions dialogue. This dialog is presented when NavToolBar is created. At the moment errorplots do not show up in the Curves tab, so one can't change their colour, markersize, etc.
This PR detects if an ErrorbarCollection is present, and adds it to the Curves popup list. This permits adjustment of the line/marker properties of the 'host' Line. Pragmatically the bars/caps of the errorplot are set to be the same color as the host Line, and the same linewidth of the host Line.

fixes #18631

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • [N/A] Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • [N/A] Conforms to Matplotlib style conventions (install flake8-docstrings and pydocstyle<4 and run flake8 --docstring-convention=all).
  • 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).
@andyfaff
Copy link
Contributor Author

@andyfaff andyfaff commented Oct 4, 2020

Possibly the most controversial change is adding a generator to flatten a nested sequence, I added this to make it easier to grab all the lines out of ErrorbarCollection.lines.

@QuLogic
Copy link
Member

@QuLogic QuLogic commented Oct 6, 2020

There is a flatten in matplotlib.cbook.

@andyfaff
Copy link
Contributor Author

@andyfaff andyfaff commented Oct 6, 2020

I'll remove the flatten I added, and use the other one. Otherwise is the PR in a suitable form?

@andyfaff
Copy link
Contributor Author

@andyfaff andyfaff commented Oct 10, 2020

@QuLogic refactored to use flatten from matplotlib.cbook

@jklymak jklymak marked this pull request as draft Apr 23, 2021
@jklymak
Copy link
Member

@jklymak jklymak commented Apr 23, 2021

Who is our figureoption guru? I've never used it, but hopefully someone will step up and shepherd this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants