Skip to content

Suggest to support custom labels in sizelegend #627

Description

@gepcel

For now, sizelegend can generate legend of sized markers, using the size of markers as labels, seems no other ways to use custom labels, unless there's some way that I don't know.

I suggest supporting custom labels. Like the following example:

import ultraplot as pplt
from legendkit import legend
fig,ax=pplt.subplots(refwidth=2.2,refheight=1)
ax.sizelegend([10,20,60],loc='ll',ncols=1, title="Ultraplot") # labels=['<10', '10-20', '20-60']
legend(ax=ax[0],loc='lower right', title='Custom Labels',
legend_items=[
('o', '<10', {'ms': 1, 'c':'r'}),
('o', '10-20', {'ms': 2, 'c':'r'}),
('o', '20-60', {'ms': 6, 'c':'r'}),
])
ax.axis('off')
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions