Skip to content

Scatter Plot SmoothTension Property takes no effect #3274

@bjschwarz

Description

@bjschwarz

Issue: (Describe the bug here)
The Smooth Tension Property on the scatter plot does not change the curve of the corresponding plot.

ScottPlot Version: (What NuGet package are you using?)
5.0.20

Code Sample:

Plot plt = new();

// use code to express information related to the the discussion
DateTime[] days = Generate.DateTime.Days(7);
int[] data = Generate.RandomIntegers(7, 5);

plt.Axes.DateTimeTicks(ScottPlot.Edge.Bottom);

var scatter = plt.Add.Scatter(days, data);
scatter.Smooth = true;
scatter.SmoothTension = 1.0f;
scatter.LineStyle.Width = 3;
scatter.LineStyle.Pattern = LinePattern.Solid;
scatter.MarkerSize = 0;

plt.SavePng("curve.png", 300, 300);

var scatter2 = plt.Add.Scatter(days, data);
scatter2.Smooth = true;
scatter2.SmoothTension = 0.0f;
scatter2.LineStyle.Width = 3;
scatter2.LineStyle.Pattern = LinePattern.Solid;
scatter2.MarkerSize = 0;

plt.SavePng("nocurve.png", 300, 300);

curve
nocurve

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedScott won't do this soon, but PRs from the community are welcome!⚠️ HIGH PRIORITY

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions