Skip to content

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

Closed
jerryluicy wants to merge 8 commits into
matplotlib:masterfrom
jerryluicy:master
Closed

jerryluicy wants to merge 8 commits into
matplotlib:masterfrom
jerryluicy:master

Conversation

@jerryluicy

@jerryluicy jerryluicy commented Mar 27, 2018 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

jklymak commented Mar 27, 2018

Copy link
Copy Markdown
Member

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

@jerryluicy

Copy link
Copy Markdown
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