Step 1: Install the ScottPlot.WPF
NuGet package
Step 2: Add this to the root element of your XAML file:
xmlns:ScottPlot="clr-namespace:ScottPlot;assembly=ScottPlot.WPF"
⚠️ WARNING: ScottPlot 5 has not yet been released.
ScottPlot 5 preview packages are available on NuGet for experimentation.
ScottPlot 5 is being actively developed, but it is not yet feature complete, fully documented,
supported, or recommended for production use at this time.
See the ScottPlot versions page for more information.
xmlns:ScottPlot="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
Step 3: Add a WpfPlot
to your layout and give it a unique name
<ScottPlot:WpfPlot x:Name="WpfPlot1" />
Step 4: Plot some data in your start-up sequence
double[] dataX = new double[] { 1, 2, 3, 4, 5 };
double[] dataY = new double[] { 1, 4, 9, 16, 25 };
WpfPlot1.Plot.AddScatter(dataX, dataY);
WpfPlot1.Refresh();
⚠️ WARNING: ScottPlot 5 has not yet been released.
ScottPlot 5 preview packages are available on NuGet for experimentation.
ScottPlot 5 is being actively developed, but it is not yet feature complete, fully documented,
supported, or recommended for production use at this time.
See the ScottPlot versions page for more information.
double[] dataX = { 1, 2, 3, 4, 5 };
double[] dataY = { 1, 4, 9, 16, 25 };
WpfPlot1.Plot.Add.Scatter(dataX, dataY);
WpfPlot1.Refresh();