⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Feature: implement semantic semantic legend entries #581

@cvanelteren

Description

@cvanelteren

With #570 and #571 the intention is to allow for easier semantic handling of legend entries. This issue holds a reminder to move towards a semantic handler. For inspiration we can checkout https://legendkit.readthedocs.io/en/latest/ (thanks @gepcel)

A must would be

  • cat_legend(...): builds categorical legend entries from discrete labels.
    Example intent: category -> color/marker mapping (["A","B","C"] with palette), returns handles/labels ready for ax.legend(...).
  • size_legend(...): builds a size scale legend for marker area/size encodings.
    Example intent: numeric size levels ([10, 50, 200]) rendered as different marker sizes with formatted labels.
  • num_legend(...): builds a numeric-color legend from continuous values.
    Example intent: sampled bins/levels from a colormap (vmin, vmax, cmap) to show gradient steps as legend swatches when a full colorbar is not desired.

Nice to have is combined colorbar with legend in one box.

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