-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Description
JR emailed code that doesn't work as expected. Fixing this code, or creating a demo which makes this easier to figure out, may be useful.
public double[] data = new double[10000];
public double[] timedata = new double[10000];
void Init() {
signalPlot = wpfPlot1.plt.PlotScatter(data, timedata);
wpfPlot1.plt.YLabel("Value");
wpfPlot1.plt.XLabel("Sample Number");
wpfPlot1.plt.Ticks(dateTimeX: true, dateTimeFormatStringX: "HH:mm:ss");
}void UpdateData() {
double randomValue = Math.Round(rand.NextDouble() - .5, 3);
double latestValue = data[nextDataIndex - 1] + randomValue;
data[nextDataIndex] = latestValue;
timedata[nextDataIndex] = DateTime.Now.ToOADate();
nextDataIndex += 1;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
