Replies: 1 comment
-
|
Hi @Cubikon, I agree that's a bit clunky, but it's the best available way I'm aware of using existing code. Adding an array of string labels to scatter plots would be possible though! If the array is empty or null, it would skip over it, but if populated it could render each label. If you're interested in creating a PR to add that feature, it could be inserted in the following region, and I'd be happy to review it! (#2010) I probably won't do this myself, but I'll add information here in case you (or someone else) wants to add this functionality and create a pull request 👍 🚀 Storing LabelsRather than adding a public string[] DataPointLabels = null;somewhere around here: ScottPlot/src/ScottPlot4/ScottPlot/Plottable/ScatterPlot.cs Lines 16 to 19 in 4008bdf Rendering LabelsThen in the render function just below this section ScottPlot/src/ScottPlot4/ScottPlot/Plottable/ScatterPlot.cs Lines 425 to 429 in 4008bdf You could add some logic to check if the array contains items, and if so iterate ScottPlot/src/ScottPlot4/ScottPlot/Plottable/MarkerPlot.cs Lines 94 to 105 in 4008bdf That code is a little fancy because it lets you customize alignment, but it should get you started! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have data with x/y values and a text value for each point. I use a Scatterplot and each point has the text added as a AddText() at the X/Y coordinates with the value as lable. This is ok, but annoying, if i want to change one value.
I would like the posibility to give addScatterPlot() a 3rd array to set a label for each point. And the posibility to use the Update() method to change them.
Example:
Beta Was this translation helpful? Give feedback.
All reactions