Repository navigation
feat: add jitter scatter plot to ScottPlotExporter - #3332
Open
karlmoriaty wants to merge 1 commit into
Open
karlmoriaty wants to merge 1 commit into
karlmoriaty wants to merge 1 commit into
Conversation
Adds an opt-in IncludeJitterPlot option that exports one point per measurement, with the horizontal position jittered around its target so overlapping values stay visible. The jitter uses a fixed seed so repeated exports of the same data are reproducible. Refs dotnet#275
Author
|
@dotnet-policy-service agree |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just adding the jitter plot part to ScottPlot.
I used Refs #275 instead of Fixes here because that issue is actually a combo request ("Jitter scatter + Box plot"). The Box plot part already got merged in #2614.
Also, following AndreyAkinshin's preference: "It's better to add plots one-by-one". This is exactly how #2614 was handled, so I'm doing the same.
Here is what I did:
Added a new IncludeJitterPlot property. It defaults to false so it doesn't change any existing export behavior.
When it's on, it draws a dot for each measurement value, jittered horizontally within ±0.3 of the target tick.
I used a fixed random seed for the jitter. So if you export the same data twice, the dots will land in the exact same spots.
Testing:
Added 2 new tests for this.
All 85/85 tests are passing (both frameworks).
Just a quick note: I didn't update anything under docs/ for this.
Thanks.