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

Labels for PatchCollection do not show #23998

Open
@Robotatron

Description

@Robotatron

Bug summary

  1. Labels / legend is not displayed
  2. Autoscale does nothing, I have to manually set the limits

image

Code for reproduction

importmatplotlib.pyplotaspltfrommatplotlib.collectionsimportPatchCollectionfrommatplotlib.patchesimportPolygonfig,axs=plt.subplots()p1,p2=Polygon([[0,0],[100,100],[200,0]],label="p1"),Polygon([[400,0],[500,100],[600,0]],label="p2")p=PatchCollection([p1,p2],label="asd")axs.add_collection(p,autolim=True)axs.set_xlim(right=600)axs.set_ylim(top=100)axs.legend()

Actual outcome

No labels/legend are shown -image

Expected outcome

Legend is shown

Additional information

No response

Operating system

No response

Matplotlib Version

3.5.2

Matplotlib Backend

No response

Python version

No response

Jupyter version

No response

Installation

No response

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