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

Change the size of legend markers... #12417

Open
Labels
keepItems to be ignored by the “Stale” Github Actiontopic: legend
@jklymak

Description

@jklymak

Closed a PR that did this, which was probably over engineered. But the main idea is probably still useful.

#11127 is a bit different, it would create many legend entries for a single scatterplot. The idea here was to unify the size of different scatter plot's handles. Many options are shown inthe stackoverflow question "setting a fixed size for points in legend". The easiest is just:

legend = plt.legend()for legobj in legend.legendHandles:    legobj.set_sizes([64])

My faviourite, which I just added to that thread as well would be to use the update function of the Handler.

def update(handle, orig):    handle.update_from(orig)    handle.set_sizes([64])plt.legend(handler_map={PathCollection : HandlerPathCollection(update_func=update)})

Originally posted by@ImportanceOfBeingErnest in#4257 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    keepItems to be ignored by the “Stale” Github Actiontopic: legend

    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