通过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(...
WpfPlot1.Plot.Add.Scatter(dataX, dataY); WpfPlot1.Refresh(); 柱形图 xmlns:ScottPlot="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"<ScottPlot:WpfPlotx:Name="WpfPlot1"/> varmyPlot = WpfPlot1.Plot;// add barsdouble[] values = {5,10,7,13}; myPlot.Add.Bars(values);// tell the...
{//xaml中的图表对象privateWpfPlot _plot;//存放实时时间/Y轴值的集合privateOctRealTimePlotList<double>_realTimeList;//存放实时时间/Y轴值的集合privateOctRealTimePlotList<double>_realTimeList2;//将数据渲染至UI画面privateDispatcherTimer _renderTimer;//折线1的颜色privateSystem.Drawing.Color _lineColor1...
创建一个新的WPF项目,或者在现有项目中打开MainWindow.xaml文件。在XAML文件中添加一个WpfPlot控件,用于显示ScottPlot图表。例如: xml <Window x:Class="WpfApp.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns...
Column="2" Margin="30" > <WpfPlot Name="Histogram" /> </Grid> //画曲线 double[] dataX = new double[curDataList.Length]; double[] dataY = new double[curDataList.Length]; for (int i = 0; i < curDataList.Length; i++) { dataX[i] = startAxisX + i; dataY[i] = cur...
创建WPF窗口:在XAML文件中创建一个WPF窗口,或者在代码中使用Window类创建一个窗口。 添加ScottPlot控件:在窗口中添加ScottPlot控件,可以通过在XAML文件中添加<FormsPlot>标签或者在代码中创建FormsPlot实例,并将其添加到窗口的布局中。 绘制图表:使用ScottPlot库提供的方法,在ScottPlot控件中绘制需要隐藏的图表。
创建WPF窗口:在XAML文件中创建一个WPF窗口,或者在代码中使用Window类创建一个窗口。 添加ScottPlot控件:在窗口中添加ScottPlot控件,可以通过在XAML文件中添加<FormsPlot>标签或者在代码中创建FormsPlot实例,并将其添加到窗口的布局中。 绘制图表:使用ScottPlot库提供的方法,在ScottPlot控件中绘制需要隐藏的图表。 隐藏绘图:...
swhardenlinked a pull requestMar 30, 2023that willclosethis issue Convert WpfPlot to CustomControl#2526 Merged swhardenclosed this ascompletedin#2526Apr 3, 2023 KroMignonmentioned this issueApr 5, 2023 ScottPlot5: WpfPlot as CustomControl#2565 Merged...
*WpfPlot: Re-implemented`GetPlotPixelPosition()`and`GetCurrentPlotPixelPosition()`(#4214,#3622)@wellsw@KroMignon ##ScottPlot 5.0.43 _Published on[NuGet](https://www.nuget.org/profiles/ScottPlot)on 2024-11-03_ Expand Down 19 changes: 19 additions & 0 deletions19src/ScottPlot5/ScottPlot5 ...
纯小白教程 基于WPF框架的应用图表开发与运用实操:liveCharts/ScottPlot/OxyPlot图表应用 B0985共计29条视频,包括:1-01、1-02、1-03等,UP主更多精彩视频,请关注UP账号。