在添加曲线后,你可以通过访问曲线的Color和LineWidth属性来设定其颜色和宽度。这些属性通常在Plottable对象的子类(如PlottableScatter或PlottableSignal)中提供。但是,由于AddScatter方法直接返回的是Plottable的基类,你可能需要将其转换为具体的子类或使用索引来访问它。 在ScottPlot的最新版本中,你可以直接在Plottable对象上...
public SignalPlot AddSignal(double[] ys, double sampleRate = 1, Color? color = null, string label = null) { SignalPlot signal = new SignalPlot() { Ys = ys, SampleRate = sampleRate, Color = color ?? settings.GetNextColor(), Label = label, // TODO: FIX THIS!!! MinRenderIndex =...
//Plot/Plot.Add.cs public SignalPlot AddSignal(double[] ys, double sampleRate = 1, Color? color = null, string label = null) { SignalPlot signal = new SignalPlot() { Ys = ys, SampleRate = sampleRate, //渲染时,将用到采样速度 Color = color ?? settings.GetNextColor(), Label = ...
formsPlot1.Plot.GetDefaultGrid(); grid.MajorLineStyle.Color = Colors.Black.WithOpacity(.15); grid.MinorLineStyle.Color = Colors.Black.WithOpacity(.05); grid.MinorLineStyle.Width =1; formsPlot1.Refresh(); } } 运行效果展示: 项目演示入口...
点大小 //第六个参数 点形状 //第七个参数 是否加粗 //第八个参数 LabelHistogram.Plot.AddScatter(dataX,dataY,System.Drawing.Color.FromArgb(curColor.R,curColor.G,curColor.B),1f,5f,MarkerShape.none,LineStyle.Solid,number.ToString());//显示图例Histogram.Plot.Legend();//刷新显示Histogram....
settings.GetNextColor(), Label = label, // TODO: FIX THIS!!! MinRenderIndex = 0, MaxRenderIndex = ys.Length - 1, }; Add(signal); return signal; } 最后在返回之前 ,这个Add(signal)会把这个对象加入到Plottables 集合中去 我们还可以添加很多元素,比如: 1 2 3 4 5 6 7 8 // plot ...
var grid = formsPlot1.Plot.GetDefaultGrid();grid.MajorLineStyle.Color = Colors.Black.WithOpacity(.15);grid.MinorLineStyle.Color = Colors.Black.WithOpacity(.05);grid.MinorLineStyle.Width = 1;formsPlot1.Refresh();}} 运行效果展示: 项目演示入口...
dll");var DataGen = Plotdll.import("ScottPlot.DataGen");var plt = Chart.Plot;// plot one set of data using the primary Y axisvar sigSmall = plt.AddSignal(DataGen.Sin(51, com.double(1)));sigSmall.YAxisIndex = 0;plt.YAxis.Label("Primary Axis");plt.YAxis.Color(sigSmall.Color)...
在上面的示例代码中,我们首先定义了两条曲线,并将它们添加到图像中。然后,我们定义了一个mouse_move...
FillColor = ScottPlot.Colors.Green.WithAlpha(.5), };varradar = myPlot.Add.Radar(newRadarSeries[] { series }); radar.Labels =newstring[] {"指标1","指标2","指标3","指标4","指标5"} .Select(s =>newLabelStyle() { Text = s, Alignment = Alignment.MiddleCenter }) ...