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

[Bug]: Pie chart with 0 array crashes #23630

Open
@discover59

Description

@discover59

Bug summary

After upgrading version from 3.3.4 to 3.5.2, pie chart generation crashes with [0,0] data.

With v3.3.4, pie chart shows empty chart.
image

But on 3.5.2, it crashes with errorcannot convert float NaN to integer.

Code for reproduction

importmatplotlib.pyplotaspltfig1,ax1=plt.subplots()fig1.set_size_inches(2.8,2.8)patches,texts,autotexts=ax1.pie([0,0])

Actual outcome

cannot convert float NaN to integer

Expected outcome

Chart with 0% in center

Additional information

No response

Operating system

Windows, Ubuntu

Matplotlib Version

3.5.2

Matplotlib Backend

TkAgg

Python version

3.8.10

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp