What can we do to make ScottPlot better? At the mo, there is a Clear() method that removes data shown on plots. This however does not clear the axes and title. How about... plt.Reset(); // Reset the plot, including data, axes, title, etc.
Clear(Plottable plottableType) // to clear just one type Plot.Clear(Plottable[] plottableTypes) // to clear several types Plot.Clear(Predicate<Plottable> selector) // to clear plots matching a criteriaContributor zrolfs commented Mar 24, 2020 I think this is happening for the new Error...
隐藏绘图:为了隐藏绘图,可以使用ScottPlot控件的Plot.Clear方法来清除绘图区域的内容。 以下是一个示例代码: 代码语言:txt 复制 using ScottPlot; namespace WpfApp { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); HidePlot(); } private void HidePlot() { formsPlot...
formsPlot1.Plot.Clear(); formsPlot1.Plot.AddScatter(xs, ys, label: "Real-Time Data", color: Color.Blue); formsPlot1.Render(); } [STAThread] public static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new RealTimePlot())...
plotCanvas.Children.Add(wpfPlot); PlotDynamicData(); } private void PlotDynamicData() { // 生成动态数据 double[] x = ScottPlot.DataGen.Consecutive(100); double[] y = ScottPlot.DataGen.RandomWalk(100); // 添加绘图数据 wpfPlot.plt.Clear(); wpfPlot.plt.PlotScatter(x, y); wpfPlot.Render...
(); 87 } 88 89 private void btnClear_Click(object sender, EventArgs e) 90 { 91 Logger.Clear(); 92 formsPlot1.Refresh(); 93 } 94 95 private void chk_showLegend_CheckedChanged(object sender, EventArgs e) 96 { 97 formsPlot1.Plot.Legend(chk_showLegend.Checked); 98 formsPlot1.Refresh(...
{//////基于ScottPlot图表库封装自己的图表库(支持MVVM-binding)///publicclassOctPlot : Control {//xaml中的图表对象privateWpfPlot _plot;//存放实时时间/Y轴值的集合privateOctRealTimePlotList<double>_realTimeList;//存放实时时间/Y轴值的集合privateOctRealTimePlotList<double>_realTimeList2;//将数据渲...
遗憾的是,您必须在UI线程中呈现图形,但您可以将UI线程的使用限制为调用wpfPlot。刷新()。创建一对...
{publicpartialclassMainWindow:Window{publicMainWindow(){InitializeComponent();InitBasicLineChart();}// 折线图privatevoidInitBasicLineChart(){// 1.定义数据double[]xs={1,2,3,4,5};double[]ys={1,4,9,16,20};// 2.添加折线plot.Plot.AddScatterLines(xs,ys);// 3.刷新界面plot.Refresh();}}...
Plot.Clear() has been improved to more effectively clear plottable objects. Various overloads are provided to selectively clear or preserve certain plot types. (#275) @StendProg PlotBar() has been lightly refactored. Argument order has been adjusted, and additional options have been added. Err...