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]: Scatter legend marker missing with initial nan value in color #26274

Open
@max3-2

Description

@max3-2

Bug summary

Plotting a scatter wherec= is a sequence with the initial value beingnan will have the legend entry showing text only

Code for reproduction

importmatplotlib.pyplotaspltimportnumpyasnpx=np.linspace(0,1,50)y=np.linspace(-1,1,50)c=np.linspace(10,100,50)c_nan=np.linspace(10,100,50)c_nan[0]=np.nanfig,ax=plt.subplots()line1=ax.scatter(x,y,c=c,s=12,label='Test 1')line2=ax.scatter(x*2,y*2,c=c_nan,s=12,label='Test 2')ax.legend()plt.show()

Actual outcome

bugreport

Expected outcome

Have each legend entry show a symbol

Additional information

No response

Operating system

WIndows

Matplotlib Version

3.6.3

Matplotlib Backend

Qt5Agg

Python version

3.10.x

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    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