## SignalXY快速入门

SignalXY是一种速度优化图，用于显示具有不均匀间隔位置（Xs）的变量（Y），这些变量按升序排列。如果数据间隔均匀，则Signal和SignalConst会更快。

``````var plt = new ScottPlot.Plot(600, 400);

(double[] xs, double[] ys) = DataGen.RandomWalk2D(new Random(0), 5_000);

plt.SaveFig("signalxy_quickstart.png");
``````

## 信号XY偏移

SignalXY绘图可以具有X和Y偏移量，将所有数据偏移一定量。

``````var plt = new ScottPlot.Plot(600, 400);

(double[] xs, double[] ys) = DataGen.RandomWalk2D(new Random(0), 5_000);

sig.OffsetX = 10_000;
sig.OffsetY = 100;

plt.SaveFig("signalxy_offset.png");
``````

## 有间隙的信号数据

``````var plt = new ScottPlot.Plot(600, 400);

var rand = new Random(0);
int pointCount = 10_000;
double[] sine = DataGen.Sin(pointCount, 3);
double[] noise = DataGen.RandomNormal(rand, pointCount, 0, 0.5);
double[] ys = sine.Zip(noise, (s, n) => s + n).ToArray();
double[] xs = Enumerable.Range(0, pointCount)
.Select(x => (double)x)
.Select(x => x > 3_000 ? x + 10_000 : x)
.Select(x => x > 7_000 ? x + 20_000 : x)
.ToArray();

plt.SaveFig("signalxy_gaps.png");
``````

## 不同密度

``````var plt = new ScottPlot.Plot(600, 400);

Random rand = new(0);
int pointCount = 5_000;
double[] sine = DataGen.Sin(pointCount, 3);
double[] noise = DataGen.RandomNormal(rand, pointCount, 0, 0.5);
double[] ys = sine.Zip(noise, (s, n) => s + n).ToArray();
double[] xs = new double[pointCount];

double x = 0;
for (int i = 0; i < pointCount; i++)
{
bool lowDensityPoint = (i % 1_000) < 10;
x += lowDensityPoint ? 10 : .05;
xs[i] = x;
}

plt.SaveFig("signalxy_density.png");
``````

## SignalXY步进模式

``````var plt = new ScottPlot.Plot(600, 400);

(double[] xs, double[] ys) = DataGen.RandomWalk2D(new Random(0), 5_000);

sigxy.StepDisplay = true;
sigxy.MarkerSize = 0;

plt.SetAxisLimits(110, 140, 17.5, 27.5);

plt.SaveFig("signalxy_step.png");
``````

## 带填充物的SignalXY

``````var plt = new ScottPlot.Plot(600, 400);

(double[] xs, double[] ys) = DataGen.RandomWalk2D(new Random(0), 5_000);