ScottPlot 3.1.6

ScottPlot is a free and open-source interactive plotting library for .NET

There is a newer version of this package available.
See the version list below for details.
Install-Package ScottPlot -Version 3.1.6
dotnet add package ScottPlot --version 3.1.6
<PackageReference Include="ScottPlot" Version="3.1.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ScottPlot --version 3.1.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

ScottPlot is a free and open-source interactive plotting library for .NET which makes it easy to interactively display data in a variety of formats. You can create interactive line plots, bar charts, scatter plots, etc., with just a few lines of code (see the ScottPlot Cookbook for examples).

In graphical environments plots can be displayed interactively (left-click-drag to pan and right-click-drag to zoom) and in console applications plots can be created and saved as images.

ScottPlot targets multiple frameworks (.NET Framework 4.5 and .NET Core 3.0), has user controls for WinForms and WPF, and is available on NuGet with no dependencies.

Quickstart

Windows Forms Application

  1. Drag/Drop FormsPlot (from the toolbox) onto your form.
  2. Add this code to your startup sequence:
double[] xs = new double[] {1, 2, 3, 4, 5};
double[] ys = new double[] {1, 4, 9, 16, 25};
formsPlot1.plt.PlotScatter(xs, ys);
formsPlot1.Render();

Console Application

double[] xs = new double[] { 1, 2, 3, 4, 5 };
double[] ys = new double[] { 1, 4, 9, 16, 25 };
var plt = new ScottPlot.Plot(600, 400);
plt.PlotScatter(xs, ys);
plt.SaveFig("demo.png");

WPF Application

MainWindow.xaml
<Window x:Class="WpfApp4.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp4"
        xmlns:ScottPlot="clr-namespace:ScottPlot;assembly=ScottPlot"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <ScottPlot:WpfPlot Name="wpfPlot1"/>
    </Grid>
</Window>
MainWindow.xaml.cs
public MainWindow()
{
    InitializeComponent();
    wpfPlot1.plt.Title("WPF Demo");
    wpfPlot1.plt.YLabel("signal level");
    wpfPlot1.plt.XLabel("horizontal units");
    Random rand = new Random();
    wpfPlot1.plt.PlotSignal(ScottPlot.DataGen.RandomWalk(rand, 10_000));
    wpfPlot1.plt.PlotSignal(ScottPlot.DataGen.RandomWalk(rand, 10_000));
    wpfPlot1.plt.PlotSignal(ScottPlot.DataGen.RandomWalk(rand, 10_000));
    wpfPlot1.plt.AxisAuto();
    wpfPlot1.Render();
}

Links

ScottPlot is a free and open-source interactive plotting library for .NET which makes it easy to interactively display data in a variety of formats. You can create interactive line plots, bar charts, scatter plots, etc., with just a few lines of code (see the ScottPlot Cookbook for examples).

In graphical environments plots can be displayed interactively (left-click-drag to pan and right-click-drag to zoom) and in console applications plots can be created and saved as images.

ScottPlot targets multiple frameworks (.NET Framework 4.5 and .NET Core 3.0), has user controls for WinForms and WPF, and is available on NuGet with no dependencies.

Quickstart

Windows Forms Application

  1. Drag/Drop FormsPlot (from the toolbox) onto your form.
  2. Add this code to your startup sequence:
double[] xs = new double[] {1, 2, 3, 4, 5};
double[] ys = new double[] {1, 4, 9, 16, 25};
formsPlot1.plt.PlotScatter(xs, ys);
formsPlot1.Render();

Console Application

double[] xs = new double[] { 1, 2, 3, 4, 5 };
double[] ys = new double[] { 1, 4, 9, 16, 25 };
var plt = new ScottPlot.Plot(600, 400);
plt.PlotScatter(xs, ys);
plt.SaveFig("demo.png");

WPF Application

MainWindow.xaml
<Window x:Class="WpfApp4.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp4"
        xmlns:ScottPlot="clr-namespace:ScottPlot;assembly=ScottPlot"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <ScottPlot:WpfPlot Name="wpfPlot1"/>
    </Grid>
</Window>
MainWindow.xaml.cs
public MainWindow()
{
    InitializeComponent();
    wpfPlot1.plt.Title("WPF Demo");
    wpfPlot1.plt.YLabel("signal level");
    wpfPlot1.plt.XLabel("horizontal units");
    Random rand = new Random();
    wpfPlot1.plt.PlotSignal(ScottPlot.DataGen.RandomWalk(rand, 10_000));
    wpfPlot1.plt.PlotSignal(ScottPlot.DataGen.RandomWalk(rand, 10_000));
    wpfPlot1.plt.PlotSignal(ScottPlot.DataGen.RandomWalk(rand, 10_000));
    wpfPlot1.plt.AxisAuto();
    wpfPlot1.Render();
}

Links

Release Notes

https://github.com/swharden/ScottPlot/releases

Dependencies

This package has no dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on ScottPlot:

Package Downloads
ScottPlot.WinForms
This package provides a Windows Forms user control to interactively display ScottPlot graphs. This package targets both .NET Framework and .NET Core.
ScottPlot.WPF
This package provides a WPF control to interactively display ScottPlot graphs in WPF applications. This package targets both .NET Framework and .NET Core.
ScottPlot.Avalonia
This package provides an Avalonia control to interactively display ScottPlot graphs in Avalonia applications. This package targets both .NET Framework and .NET Core.
WpfAppNetCore
Package Description

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on ScottPlot:

Repository Stars
swharden/ScottPlot
Interactive Plotting Library for .NET
swharden/Csharp-Data-Visualization
Code examples and notes for displaying data with C#
OndrejNepozitek/Edgar-DotNet
Configurable procedural layout generator

Version History

Version Downloads Last updated
4.0.42 102 9/27/2020
4.0.41 169 9/26/2020
4.0.40 371 9/20/2020
4.0.39 2,066 8/9/2020
4.0.38 1,273 7/7/2020
4.0.37 513 6/22/2020
4.0.36 155 6/22/2020
4.0.35 764 6/9/2020
4.0.34 964 5/18/2020
4.0.33 115 5/18/2020
4.0.32 154 5/17/2020
4.0.31 499 5/6/2020
4.0.30 239 5/4/2020
4.0.29 3,700 4/11/2020
4.0.28 356 4/7/2020
4.0.27 665 4/5/2020
4.0.26 270 4/5/2020
4.0.25 566 3/29/2020
4.0.24 243 3/27/2020
4.0.23 298 3/23/2020
4.0.22 509 3/17/2020
4.0.21 1,295 3/15/2020
4.0.19 1,013 2/29/2020
4.0.18 1,295 2/7/2020
4.0.17 407 2/6/2020
4.0.16 310 2/2/2020
4.0.15 235 1/28/2020
4.0.14 333 1/24/2020
4.0.13 1,053 1/21/2020
4.0.12 151 1/21/2020
4.0.11 228 1/19/2020
4.0.10 200 1/18/2020
4.0.9 1,264 12/4/2019
4.0.8 123 12/3/2019
4.0.7 213 12/1/2019
4.0.5 192 11/27/2019
4.0.4 200 11/24/2019
4.0.3 146 11/23/2019
4.0.2 314 11/9/2019
4.0.1 544 11/3/2019
3.1.6 584 10/21/2019
3.1.5 327 10/7/2019
3.1.4 269 9/22/2019
3.1.3 511 8/25/2019
3.1.1 434 8/20/2019
3.0.9 620 8/12/2019
3.0.8 236 8/4/2019
3.0.7 207 7/27/2019
3.0.6 294 6/30/2019
3.0.5 191 6/24/2019
3.0.4 186 6/24/2019
3.0.3 986 5/29/2019
3.0.2 209 5/28/2019
3.0.1 247 5/28/2019
Show less