Skip to content

feat: add jitter scatter plot to ScottPlotExporter - #3332

Open
karlmoriaty wants to merge 1 commit into
dotnet:masterfrom
karlmoriaty:feat-jitter-plot
Open

karlmoriaty wants to merge 1 commit into
dotnet:masterfrom
karlmoriaty:feat-jitter-plot

Conversation

@karlmoriaty

Copy link
Copy Markdown

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.

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
@karlmoriaty

Copy link
Copy Markdown
Author

@dotnet-policy-service agree

This branch has not been deployed

No deployments
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.

1 participant