矩形等高線プロット
等間隔に配置された点を持つ矩形等高線プロットは、3D 点の 2D 配列から作成できます。
ScottPlot.Plot myPlot = new();
Coordinates3d[,] cs = new Coordinates3d[50, 50];
for (int y = 0; y < cs.GetLength(0); y++)
{
for (int x = 0; x < cs.GetLength(1); x++)
{
double z = Math.Sin(x *.1) + Math.Cos(y* .1);
cs[y, x] = new(x, y, z);
}
}
var contour = myPlot.Add.ContourLines(cs);
contour.LineColor = Colors.Black.WithAlpha(.5);
contour.LinePattern = LinePattern.Dotted;
myPlot.Axes.TightMargins();
myPlot.HideGrid();
myPlot.SavePng("demo.png", 400, 300);
このレシピは、等高線プロットカテゴリにある多数のレシピの 1 つです
