Replies: 1 comment
-
Hi @KennyTK, I think you can achieve this by assigning the palette like this: formsPlot1.Plot.Add.Palette = new ScottPlot.Palettes.Category10(); // or what the user wants Whatever palette is assigned there will control the default colors of plotted things which are added to the plot If you've already plotted things and wish to change their color later, the solution there is to save the thing you create at the class level, kind of like this: myThing = formsPlot1.Plot.Add.Scatter(xs, ys); Then later in response to user input you can customize its appearance: myThing.LineColor = Colors.Red; // or what the user wants
formsPlot1.Refresh(); // force a redraw Hope it helps! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My application has multiple Scottplots with one plottable per plot. I'd like to add functionality so the user can change the color of the plottable on a per plot basis.
https://scottplot.net/cookbook/5.0/ScottPlotQuickstart/CustomizingPlottables/
Beta Was this translation helpful? Give feedback.
All reactions