-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Description
Should be fairly simple. I pulled the source code and did a quick test.
In ScottPlot.Plottable.ScatterPlot:
public bool ShowInLegend { get; set; } = true;
public LegendItem[] GetLegendItems()
{
if (!ShowInLegend) return null;
var singleLegendItem = new LegendItem()
{
label = Label,
color = Color,
lineStyle = LineStyle,
lineWidth = LineWidth,
markerShape = MarkerShape,
markerSize = MarkerSize
};
return new LegendItem[] { singleLegendItem };
}
That seemed to work well, I can now choose if I want a plot to be displayed in the legend or not. Simply adding
public bool ShowInLegend { get; set; } = true;
and
if (!ShowInLegend) return null;
to all Plottables which don't return null on GetLegendItems should work.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels