ScottPlot / ScottPlot/ScottPlot
Right way to switch between plots?
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.8k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Question:
I use small data sets to show one of those at a time. Also, I use point highlighting (a marker) and display the points values at hover time.
What is the right way to switch between those sets while keeping having the above features?
When to clear, when to refresh?
ScottPlot Version:
5.0
My Scenario
I use one Scatter instance and try to display one of two plots at a time, selecting them from a drop down.
For every selection done, I do the following steps:
- clear
- remove the text and marker (as in "Show Value Under Mouse, Multiple Scatter" example)
- remove the scatter set
- add back the selected scatter and, the text and the marker (as in "Show Value Under Mouse, Multiple Scatter" example)
- refresh
The effect varies. Sometimes it does display the new plot, sometimes does not until the mouse hovers the control.
Sometimes, after displaying the new plot, it brings back the old plot at mouse hovering over the control.
I can't understand why.
Please advice.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the “Show Value Under Mouse, Multiple Scatter” example and the described clear, remove, add, and refresh sequence. Trace how plot selection, the marker, and hover text are updated when the dropdown changes. Done means switching between the two scatter sets reliably shows only the selected plot and does not restore the old plot during hover.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100