Skip to content

Conversation

dstansby
Copy link
Member

PR Summary

Fixes #17758. This seemed pretty easy. I think there's room to add some helper functions to do the broadcasting and iterating for all of the rect properties, but perhaps that can be done elsewhere? First PR in a while, so apologies if I've got something wrong...

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

Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

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

This is great. Maybe https://matplotlib.org/gallery/shapes_and_collections/hatch_demo.html#sphx-glr-gallery-shapes-and-collections-hatch-demo-py can be updated to use this?
(Though honestly that example is not great...)

@dstansby
Copy link
Member Author

Good idea - I updated that example and it's quite a bit better without having to loop through the bar patches individually.

@tacaswell tacaswell added this to the v3.4.0 milestone Jun 28, 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.

Left a small suggested change for the tests (use the default style rather than classic style), but I am 👍 on this going in as-is as well.

I am glad my estimation of the difficulty was wrong :)

@tacaswell
Copy link
Member

Also, welcome back @dstansby :)

@tacaswell tacaswell merged commit 8d2c16b into matplotlib:master Jun 28, 2020
@dstansby dstansby deleted the bar-hatch branch June 28, 2020 17:58
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.

bar, barh should take a list of hatches like it does of colors
3 participants