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

legend_artist method as legend handler for artists and proxy objects #9607

Open
Labels
@2sn

Description

@2sn

Feature Proposal

allow artists and proxy objects to define their own legend handler

background

Currently one has to define a handler map with an object if you want to get your own proxy legend entry. It needs to provide an object with only the methodlegend_artist. It would be a lot easier if if any proxy object used in the legend - or any artist - defining their ownlegend_artist method, that is being used. At the very least if there is no handler in the handler list for this object, but maybe even overwriting the handler map. For the former, in legend.py one would only need to add in the routine

defget_legend_handler(legend_handler_map,orig_handle):

The extra lines:

ifhasattr(orig_handle,'legend_artist'):returnorig_handle

before the

returnNone

if added at the beginning of the routine, it would overwrite the map. I assume not even the former is very likely to affect much existing code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp