Skip to content

[Bug]: .remove() on ErrorbarContainer object does not remove the corresponding item from the legend - #25386

Closed
Higgs32584 wants to merge 0 commit into
matplotlib:mainfrom
Higgs32584:main
Closed

Higgs32584 wants to merge 0 commit into
matplotlib:mainfrom
Higgs32584:main

Conversation

@Higgs32584

Copy link
Copy Markdown
Contributor

#25274
Patch for bug issue 25274

PR Checklist

Documentation and Tests

Release Notes

  • N/A
  • N/A
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

@rcomer

rcomer commented Mar 5, 2023 •

Copy link
Copy Markdown
Member

Thanks for your contribution @Higgs32584! This will need a test that would have failed without the change, but now passes. I think the example from the issue could be adapted into an image comparison test that uses the check_figures_equal decorator.

Edit: actually I think the simpler and more efficient testing approach would be to check the return value from ax.get_legend_handles_labels(). No need for an image comparison.

@Higgs32584

Copy link
Copy Markdown
Contributor Author

I apologize for closing this, this was not meant to be closed! I will commit this with a test later, I am still getting used to the development workflow!

@rcomer

rcomer commented Mar 5, 2023

Copy link
Copy Markdown
Member

@Higgs32584 we have various support for new contributors if it helps:
https://matplotlib.org/devdocs/devel/contributing.html

@Higgs32584

Copy link
Copy Markdown
Contributor Author

Ok thank you! I will add a pull request later with tests! Have a nice day!

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

Projects

Development

Successfully merging this pull request may close these issues.

[Bug]: .remove() on ErrorbarContainer object does not remove the corresponding item from the legend

3 participants