Skip to content

[Bug]: Limit autoscaling doesn't take into account pie() labels #22057

Open
@dstansby

Description

@dstansby

Bug summary

Autoscaled axis limits don't take into account text labels added by Axes.pie().

Code for reproduction

import matplotlib.pyplot as plt
labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
sizes = [15, 30, 45, 10]

plt.pie(sizes, labels=labels, labeldistance=1.5, frame=True)
plt.show()

Actual outcome

pie

Expected outcome

Text labels are taken into account when autoscaling the Axes, and limits are expanded to include the labels.

Additional information

No response

Operating system

No response

Matplotlib Version

3.6.0.dev1129+ga35921c407

Matplotlib Backend

No response

Python version

No response

Jupyter version

No response

Installation

git checkout

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions