Skip to content

Added feature (Make pie charts circular by default #10789) #10887

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

Closed
wants to merge 8 commits into from
Closed

Added feature (Make pie charts circular by default #10789) #10887

wants to merge 8 commits into from

Conversation

jerrylui803
Copy link
Contributor

@jerrylui803 jerrylui803 commented Mar 27, 2018

PR Summary

github.com//issues/10789
As seen in the issue link above, a simple way to generate a pie graph is using plt.pie, and the second method to generate a pie graph is by using plt.subplots. Both of these approaches creates the pie graph through _axes.py by using an Axes instance which calls its pie method; the additional line to add calls the set_aspect function, which sets the aspect of the axis scaling, with ‘equals’ as parameters and this results in a default circular pie graph with an equal aspect ratio as wanted.

Here is the travis test: https://travis-ci.org/jerrylui803/matplotlib/builds/358696515

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 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

@tacaswell tacaswell added this to the v3.0 milestone Mar 27, 2018
@tacaswell
Copy link
Member

@jerrylui803 Thanks! Could you please squash this to one commit and add a test so it does not break again in the future?

xref #10789

@jklymak
Copy link
Member

jklymak commented Mar 27, 2018

You should also change the docstring to say that it is setting the aspect ratio.

@jerrylui803
Copy link
Contributor Author

Will do, I'll delete this and make a new pull request

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