ScottPlot.WPF包。 在WPF项目中添加ScottPlot的WPF控件: 在XAML文件中,添加WpfPlot控件。这个控件是ScottPlot为WPF提供的封装,用于在WPF应用程序中显示图表。 xml <Window x:Class="YourNamespace.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas....
{//xaml中的图表对象privateWpfPlot _plot;//存放实时时间/Y轴值的集合privateOctRealTimePlotList<double>_realTimeList;//存放实时时间/Y轴值的集合privateOctRealTimePlotList<double>_realTimeList2;//将数据渲染至UI画面privateDispatcherTimer _renderTimer;//折线1的颜色privateSystem.Drawing.Color _lineColor1...
通过Canvas控件的Children属性来添加ScottPlot控件。 using System.Windows; using ScottPlot; using ScottPlot.Plottable; namespace WpfApp { public partial class MainWindow : Window { private WpfPlot wpfPlot; public MainWindow() { InitializeComponent(); wpfPlot = new WpfPlot(); plotCanvas.Children.Add(...
formsPlot4.plt.YLabel("Vertical Axis Label");//formsPlot4.plt.Legend(location: ScottPlot.legendLocation.upperLeft);//formsPlot4.plt.Axis(y1: 0);formsPlot4.Render(); 就这样吧~
renderDelay: (int)Configuration.ScrollWheelZoomHighQualityDelay); //执行事件 ControlName = name; Reset(width, height);// 此时是width = 1,height =1,主要用于创建Plot实例 } /// /// Reset the back-end by creating an entirely new plot of the given dimensions /// public...
ScottPlot和WPF背景渲染 、、 ScottPlot用于显示10,000多个数据点的实时时间图。计时器每秒钟执行一次刷新,但是,它会将整个UI冻结几毫秒,这是一个循环。ScottPlot确实有一个非阻塞的Chart.RenderRequest();方法,但是图表仍然呈现在UI线程上,因此不能解决问题。bg.DoWork += (s, e) => Chart.RenderRequest(); bg...
varsettings=newGLWpfControlSettings(){MajorVersion=2,MinorVersion=1,RenderContinuously=false}; this.Render+=OnPaint; this.Loaded+=(s,e)=> { SKGLElementWindowListenerlistener=newSKGLElementWindowListener(this); this.listener=listener; }; Start(settings); ...
Setting WpfPlot.Configuration.UseRenderQueue = true seems to help but it has the same problem just less frequently. jbuckmccready mentioned this issue Oct 20, 2021 Use WriteableBitmap to improve performance of WPF rendering #1388 Merged Contributor Author jbuckmccready commented Oct 20, 2021 ...
和 C# 的各个新特性,相对来说基础性能较好,也许后续可以考虑作为 SharpDx 的代替dotnet 读 WPF 源...
ScottPlot.Plot myPlot =new(400,300); myPlot.AddScatterPoints(x1.ToArray<double>(), y1.ToArray<double>(), markerSize:5); myPlot.AddScatter(x1.ToArray<double>(), y2.ToArray<double>(), markerSize:0); myPlot.Title($"y ={m:0.00}x +{b:0.00}"); ...