-
Notifications
You must be signed in to change notification settings - Fork 958
Closed
Description
Current behavior described by @dhgigisoave in #1987 sounds like a "floor" effect
ScottPlot/src/ScottPlot4/ScottPlot/Plottable/SignalPlotBase.cs
Lines 826 to 835 in 9ff29e2
/// <summary> | |
/// Return the index for the data point corresponding to the given X coordinate | |
/// </summary> | |
private int GetIndexForX(double x) | |
{ | |
int index = (int)((x - OffsetX) / SampleRate); | |
index = Math.Max(index, MinRenderIndex); | |
index = Math.Min(index, MaxRenderIndex); | |
return index; | |
} |
I think the solution here is to add one half of the sample period to the given x before finding its index...
Metadata
Metadata
Assignees
Labels
No labels