Skip to content

Colormap: shortcut to get a range of colors #3947

@swharden

Description

@swharden

This is a common task:

ScottPlot.Colormaps.Turbo cmap = new();

for (int i = 0; i < count; i++)
{
    double fraction = (double)i / (count - 1);
    sig.Color = cmap.GetColor(fraction);

It would be nice if there were a shortcut to get a collection of colors given a start and stop position on a colormap

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