Skip to content

Add 'step' and 'barstacked' to histogram_histtypes demo #15357

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

Perseudonymous
Copy link
Contributor

PR Summary

Add example plots for the step and barstacked histogram types to the histogram_histtypes demo. This partially addresses the discussion in #7121 by adding examples of all four available histtypes.

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

@Perseudonymous
Copy link
Contributor Author

I had a look at the CircleCI logs and there are a lot of errors which relate to files which are not changed in this pull request.

ax0.set_title('stepfilled')
fig, axs = plt.subplots(nrows=2, ncols=2)

axs[0, 0].hist(x, 20, density=True, histtype='stepfilled', facecolor='g', alpha=0.75)

Choose a reason for hiding this comment

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

This line is too long, hence the test error

./examples/statistics/histogram_histtypes.py:30:80: E501 line too long (85 > 79 characters)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, I have fixed the line. The CircleCI build was failing once I did this due to a missing import fixed in 4677fd9

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.

Thanks for the contribution. This mixes two documentation styles: The original two examples are listed in bullet points at the top; the two new examples instead have a comment in the code. Please unify these.

@timhoffm timhoffm merged commit d6e4051 into matplotlib:master Oct 4, 2019
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Oct 4, 2019
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.

3 participants