Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

"round_numbers" axis limits + axis("equal") sometimes sends artists out of axes limits. #14898

Open
Labels
keepItems to be ignored by the “Stale” Github Action
@anntzer

Description

@anntzer

Bug report

Bug summary

The following is slightly modified from test_axes.py::test_pie_frame_grid, with only the center of the topmost pie slightly modified:

frompylabimport*frommatplotlibimportstyle;style.use("classic")# The slices will be ordered and plotted counter-clockwise.labels='Frogs','Hogs','Dogs','Logs'sizes= [15,30,45,10]colors= ['yellowgreen','gold','lightskyblue','lightcoral']# only "explode" the 2nd slice (i.e. 'Hogs')explode= (0,0.1,0,0)plt.pie(sizes,explode=explode,labels=labels,colors=colors,autopct='%1.1f%%',shadow=True,startangle=90,wedgeprops={'linewidth':0},frame=True,center=(2,2))plt.pie(sizes[::-1],explode=explode,labels=labels,colors=colors,autopct='%1.1f%%',shadow=True,startangle=90,wedgeprops={'linewidth':0},frame=True,center=(5,2))plt.pie(sizes,explode=explode[::-1],labels=labels,colors=colors,autopct='%1.1f%%',shadow=True,startangle=90,wedgeprops={'linewidth':0},# The original test has center=(3, 5)frame=True,center=(3,4.9))# Set aspect ratio to be equal so that pie is drawn as a circle.plt.axis('equal')plt.show()

This yields
test
which is clearly less than great...

Matplotlib version

  • Operating system: linux
  • Matplotlib version: master, but present at least since 2.0
  • Matplotlib backend (print(matplotlib.get_backend())): any
  • Python version: 37
  • Jupyter version (if applicable):
  • Other libraries:

Metadata

Metadata

Assignees

No one assigned

    Labels

    keepItems to be ignored by the “Stale” Github Action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp