Skip to content

Scatter: Plot.Add.ScatterLine() convenience methods#3462

Merged
swharden merged 13 commits intoScottPlot:mainfrom
MCF:scatterline
Mar 15, 2024
Merged

Scatter: Plot.Add.ScatterLine() convenience methods#3462
swharden merged 13 commits intoScottPlot:mainfrom
MCF:scatterline

Conversation

@MCF
Copy link
Contributor

@MCF MCF commented Mar 13, 2024

These new methods match the Plot.Add.Scatter methods in argument and functionality, except the plot markers are not shown.

The old way of adding a scatter plot without markers:

var sp = plt.Add.Scatter(xs, ys);
sp.MarkerSize = 0;

The new way:

plt.Add.ScatterLine(xs, ys);

Fixes #3452

MCF added 3 commits March 13, 2024 00:11
They match the Add.Scatter methods in argument type and resulting plots,
except plot markers are hidden and only the line is plotted.  Did not
implement matching methods for the two Add.Scatter methods that plotted
a single point.
Also removed a leftover ScaleFactor setting in the recipe that was
checked in by mistake.
@swharden swharden changed the title Add Plot.Add.ScatterLine convenience methods Scatter: Plot.Add.ScatterLine() convenience methods Mar 13, 2024
@swharden
Copy link
Member

Thanks @MCF, this looks great! I simplified the cookbook recipe and added a complimentary AddScatterPoints() to match the API from ScottPlot 4.1

@swharden swharden enabled auto-merge March 15, 2024 12:05
@swharden swharden merged commit 3c09256 into ScottPlot:main Mar 15, 2024
@MCF MCF deleted the scatterline branch March 15, 2024 14:36
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.

Plot.Add.ScatterLine()

2 participants