Skip to content

SP5: Improve Colorbar layout and ticks #3294

@NateEbling

Description

@NateEbling

Question: Can I add a color bar to a plot object without data and what needs to be passed in for the source parameter?

ScottPlot Version: 5.0.20

Code Sample:

public Plot MakePlot()
{
    ScottPlot.Plot myPlot = new();
   
    myPlot.XLabel("X");
    myPlot.YLabel("Y");
    myPlot.Title("Title");
    
    myPlot.Add.ColorBar(   );

    return myPlot;
}

The source parameter is of type IHasColorAxis, but I'm not clear on what to pass in, or if this is even possible.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions