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]: Using "." as markers create wrong-sized legend_elements for scatter plot #21848

Open
@tobiscode

Description

@tobiscode

Bug summary

IfAxes.scatter() is being used to create a scatter plot withmarker=".", the legend entries created byPathCollection.legend_elements() have the wrong sizes.

Code for reproduction

# importsimportmatplotlib.pyplotasplt# create figurefig=plt.figure()ax=fig.add_subplot()points=ax.scatter([-2,0,-2], [-1,0,1],s=[10,50,100],marker=".")# add legendhandles,labels=points.legend_elements(prop="sizes",num=None)ax.legend(handles,labels)# showplt.show()

Actual outcome

image

Expected outcome

This is if settingmarker="o":

image

Additional information

No response

Operating system

Linux

Matplotlib Version

3.4.3 and 3.5.0

Matplotlib Backend

QtAgg

Python version

3.9.7

Jupyter version

No response

Installation

conda

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