Skip to content

SP5: Do not show hiden plotable in Legend#3552

Merged
swharden merged 4 commits intoScottPlot:mainfrom
KroMignon:LegendVisibility
Apr 3, 2024
Merged

SP5: Do not show hiden plotable in Legend#3552
swharden merged 4 commits intoScottPlot:mainfrom
KroMignon:LegendVisibility

Conversation

@KroMignon
Copy link
Contributor

This should fix #3545 and #3541.

ScottPlot.Plot myPlot = new();

var s1 = myPlot.Add.Signal(Generate.Sin());
s1.Label = "Sinus";
var s2 = myPlot.Add.Signal(Generate.Cos());
s2.Label = "Cosinus";

s1.IsVisible = false;

myPlot.Legend.IsVisible = true;
myPlot.SavePng("Legend.png", 640, 480);

Legend

@swharden swharden linked an issue Apr 3, 2024 that may be closed by this pull request
@swharden swharden enabled auto-merge April 3, 2024 10:56
@swharden swharden merged commit 17f82d3 into ScottPlot:main Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Legend: items are not hidden when plottables are hidden LegendItem: The IsVisible property should be settable

2 participants