Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Labels
Description
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
Expected outcome
This is if settingmarker="o"
:
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