⚠️ ScottPlot 5.0.8-beta is a preview package
This page describes a beta release of ScottPlot. It is available on NuGet as a preview package, but its API is not stable and it is not recommended for production use. See the ScottPlot Versions page for more information.
ScottPlot 5 Quickstart
A survey of basic functionality in ScottPlot 5
Display paired X/Y data as a scatter plot.
Functions that add things to plots return the plottables they create. Interact with the properties of plottables to customize their styling and behavior.
Signal plots are optimized for displaying evenly spaced data.
Signal plots can interactively display millions of data points in real time. Double-click the plot to display performance benchmarks.
Axis labels can be extensively customized.
A legend displays plottables in a key along the edge of a plot. Most plottables have a Label property which configures what text appears in the legend.
How to customize plots
Plots contain many objects which can be customized individually by assigining to their public properties, but helper methods exist in the Plot's Style object that make it easier to customzie many items at once using a simpler API.
Axis labels, tick marks, and frame can all be customized.
Grid lines can be customized. Custom grid systems can be created to give developers full control of grid rendering, but the default grid can be interacted with to customize its appearance.
Grid lines are typically drawn beneath data, but grids can be configured to render on top of plottables too.
A palette is a set of colors, and the Plot's palette defines the default colors to use when adding new plottables. ScottPlot comes with many standard palettes, but users may also create their own.
Many plot types have a MarkerStyle which can be customized.
Many plot types have a LineStyle which can be customized.
All components of an image can be scaled up or down in size by adjusting the ScaleFactor property. This is very useful for creating images that look nice on high DPI displays with display scaling enabled.
Axis and Ticks
Examples of common customizations for axis labels and ticks
Axis labels are the text labels centered on each axis. The text inside these labels can be changed, and the style of the text can be extensively customized.
Axis Limits can be set manually in different ways.
The current axis limits can be read in multiple ways.
The axis limits can be automatically adjusted to fit the data. Optional arguments allow users to define the amount of whitespace around the edges of the data.
How to create a plot containig only the data area and no axes.
A legend is a key typically displayed in the corner of a plot
The default legend can be easily accessed and customized. It is possible to add multiple legends, including custom ones implementing ILegend.
Legends may be constructed manually.
Legends typically show all plot items with populated Label fields. However, users can use the manual legend property to only show legend items from specific plottables.
Advanced customization of tick marks and tick labels
Users can customize the logic used to create tick labels from tick positions.
Tick generators determine where ticks are to be placed and also contain logic for generating tick labels from tick positions. Alternative tick generators can be created and assigned to axes. Some common tick generators are provided with ScottPlot, and users also have the option create their own.
Plot data values on a DataTime axes
Advanced Axis Features
Tick mark customization and creation of multi-Axis plots
Additional axes may be added to plots. Plottables are displayed using the coordinate system of the primary axes by default, but any plottable can be displayed using any X and Y axis.
Bar plots represent values as horizontal or vertical rectangles
Bar plots can be added from a series of values.
The exact position and size of each bar may be customized.
Bar plots can be grouped into bar series and plotted together.
Box plots show a distribution at a glance
Box plots can be added from a series of values.
One can easily create a box plot with only a single box.
Box plots can be oriented horizontally, similarly to bar plots.
Similarly to bar charts, box plots can be compared across multiple categories.
Error Bars communicate the range of possible values for a measurement
Error Bars go well with scatter plots.
Error size can be set for all dimensions.
FillY plots display the vertical range between two Y values at defined X positions
FillY plots can be created from X, Y1, and Y2 arrays.
FillY plots can be created from two scatter plots that share the same X values.
FillY plots can be created from data of any type if a conversion function is supplied.
FillY plots can be customized using public properties.
Finance plots display price data binned into time ranges
OHLC charts use symbols to display price data (open, high, low, and close) for specific time ranges.
Candlestick charts use symbols to display price data. The rectangle indicates open and close prices, and the center line indicates minimum and maximum price for the given time period. Color indicates whether the price increased or decreased between open and close.
Polygon plots draws a polygon
Polygon plots can be added from a series of vertices, and must be in clockwise order.
Polygon plots can be fully customized.
Signal plots display evenly-spaced data
Signal plots can be offset by a given X and Y value.