绘图仪:比例尺
比例尺
可以在任何绘图的角落添加L形比例尺。将垂直或水平尺寸设定为零,比例尺将仅跨越一个维度。
var plt = new ScottPlot.Plot(600, 400);
// plot sample data
plt.AddSignal(DataGen.Sin(51));
plt.AddSignal(DataGen.Cos(51));
// remove traditional scale indicators
plt.Grid(enable: false);
plt.Frameless();
// add an L-shaped scalebar
plt.AddScaleBar(5, .25, "100 ms", "250 mV");
plt.SaveFig("scalebar_quickstart.png");
水平标尺
将垂直或水平尺寸设定为零,比例尺将仅跨越一个维度。
var plt = new ScottPlot.Plot(600, 400);
// plot sample data
plt.AddSignal(DataGen.Sin(51));
plt.AddSignal(DataGen.Cos(51));
// show only the left axis
plt.XAxis.Hide();
plt.XAxis2.Hide();
plt.YAxis2.Hide();
plt.Grid(enable: false);
// add a horizontal scale bar (no Y height)
plt.AddScaleBar(5, 0, "100 ms", null);
plt.SaveFig("scalebar_horizontal.png");
样式比例尺
可以在任何绘图的角落添加L形比例尺。将垂直或水平尺寸设定为零,比例尺将仅跨越一个维度。
var plt = new ScottPlot.Plot(600, 400);
// plot sample data
plt.AddSignal(DataGen.Sin(51));
plt.AddSignal(DataGen.Cos(51));
// remove traditional scale indicators
plt.Grid(enable: false);
plt.Frameless();
// add an L-shaped scalebar
plt.AddScaleBar(5, .25, "100 ms", "250 mV");
// add style
plt.Style(Style.Black);
plt.SaveFig("scalebar_styled.png");