ScottPlot 5 Cookbook (original) (raw)

General


Plot Types

General

Customizing Grids

Advanced customization of grid lines

Grid lines can be hidden.

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.

Axis-specific styling properties are available for extensive axis-specific customization of grid line styling.

Grid lines are typically drawn beneath data, but grids can be configured to render on top of plottables too.

Grid lines use the bottom and left axes by default, but this behavior can be customized for plots which use other axes.

Regions between alternating pairs of major grid lines may be filled with a color specified by the user

Grid and plot styling can be customize to achieve a pleasing effect in dark mode

Customizing Ticks

Advanced customization of tick marks and tick labels

Users can customize the logic used to create tick labels from tick positions. Old versions of ScottPlot achieved this using a ManualTickPositions method.

Users can customize the logic used to create datetime 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.

The default axes have a SetTicks() helper method which replaces the default tick generator with a manual tick generator pre-loaded with the provided ticks.

Users desiring more control over major and minor tick positions and labels can instantiate a manual tick generator, set it up as desired, then assign it to the axis being customized

Users may define custom ticks using DateTime units

Users can customize tick label rotation.

The axis size can be increased to accommodate rotated or long tick labels.

Users can disable grid lines for specific axes.

Space between ticks can be increased by setting a value to indicate the minimum distance between tick labels (in pixels).

Tick density can be adjusted as a fraction of the default value. Unlike MinimumTickSpacing, this strategy is aware of the size of tick labels and adjusts accordingly.

A target number of ticks can be provided and the automatic tick generator will attempt to place that number of ticks. This strategy allows tick density to decrease as the image size increases.

Minor tick marks are automatically generated at intervals between major tick marks. By default they are evenly spaced, but their density may be customized.

The appearance of logarithmic scaling can be achieved by log-scaling the data to be displayed then customizing the minor ticks and grid.

Placement of minor tick marks in plots with logarithmic axes may my customized using a custom minor tick generator. Some may be bundled with ScottPlot as shown here, but users may create their own and apply them as seen here.

Miscellaneous

Miscellaneous features and customization options

An image can be used for the background of the data area.

An image can be used for the background of a figure.

Colors can be mixed to createa range of colors. This strategy uses linear RGB interpolation.

Users can apply custom typefaces by loaded from font files.

Multiple Axes

Tick mark customization and creation of multi-Axis plots

New plots have one axis on every side. Axes on the right and top are invisible by default. To use the right axis, make it visible, then tell a plottable to use it.

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.

The default Y axis is the one on the left of the plot, but the right Y axis may be used instead.

Color

Color tools and features built into ScottPlot

ScottPlot.Colors contains many colors

ScottPlot.Colors can be constructed from RGB values (0-255), HTML style hexadecimal color codes (00-FF), or System.Drawing.Color objects.

The Alpha channel sets transparency of a color

Colors have a MixWith() method that can be used to blend two colors

Colors may be generated from HSL (hue, saturation, luminosity) values.

A collection of colors can be generated from the linear interpolation between two colors.

The simplest way to generate random colors is to create colors which have same saturation and luminosity but random hue.

Colormaps may be used to source a collection of colors.

Helper methods make it easy to lighten or darken colors.

Plottable Management

How to add, remove, and reorder items in plots

Although the Plot.Add class has many helpful methods for creating plottable objects and adding them to the plot, users can instantiate plottable objects themselves and use Add.Plottable() to place it on the plot. This strategy allows users to create their own plottables (implementing IPlottable) with custom appearance or behavior.

Use Clear() to remove all plottables.

Individual items may be removed from the plot.

All plottables of a given type may be removed from a plot with a single command.

The plottable list contains all plottables which will be rendered in order. Helper methods are available to move plottables to the front.

Axis and Ticks

Examples of common customizations for axis labels and ticks

Axis Limits can be set by the user.

Use GetLimits() to obtain the current axis limits.

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.In older versions of ScottPlot this functionality was achieved by a method named AxisAuto().

Users can display data on an inverted axis by setting axis limits setting the lower edge to a value more positive than the upper edge.

Customize the logic for the automatic axis scaler to ensure that axis limits for a particular axis are always inverted when autoscaled.

Axis rules can be put in place which force the vertical scale (units per pixel) to match the horizontal scale so circles always appear as circles and not stretched ellipses.

Users can create their own fully custom axes to replace the default ones (as demonstrated in the demo app). Some experimental axes are available for users who may be interested in alternative axis display styles.

To improve crispness of straight vertical and horizontal lines, Anti-aliasing is disabled by default for axis frames, tick marks, and grid lines. Anti-aliasing can be enabled for all these objects by calling the AntiAlias helper method.

Demonstrates how to hide axis ticks and turn frame lines on and off.

Axis tick labels can be displayed using a time format.

DateTime axes are achieved using Microsoft's DateTime.ToOADate() and DateTime.FromOADate() methods to convert between dates and numeric values. Advanced users who wish to display data on DateTime axes may prefer to work with collections of doubles rather than collections of DateTimes.

Users can provide their own logic for customizing DateTime tick labels

Make ticks render at fixed intervals. Optionally make the ticks render from a custom start date, rather than using the start date of the plot (e.g. to draw ticks on the hour every hour, or on the first of every month, etc).

A floating or centered axis may be realized by hiding the default axes which appear at the edges of the plot and creating a new floating axis and adding it to the plot.

Grid lines have many options to allow extensive customization.

For cases where axis label font styling does not provide the desired level of customization, a bitmap image may be displayed as an axis label. This strategy allows rich text to be realized using any third party tool that can render that text as a bitmap. It also enables users to place icons or images in their axis labels.

Numeric tick labels may be displayed using multiplier notation (where tick labels are displayed using scientific notation with the eponent displayed in the corner of the plot). A helper method is available to set-up multiplier notation with a single statement, but users can interact with the object this method returns (not shown here) or inspect the code inside of that method to learn how to achieve enhanced customization abilities.

Legends

A legend is a key typically displayed in the corner of a plot

Many plottables have a Label property that can be set so they appear in the legend.

Enabling Right To Left (RTL) support correctly renders text in RTL languages.

Legends may be constructed manually and markers customized.

Access the Legend object directly for advanced customization options.

Use the legend shape override to force all legend items to display using the given marker shape.

Use the legend shape override to force all legend items to display using the given marker shape. Color is determined automatically in this example.

Legend items may be arranged horizontally instead of vertically

Legend items may wrap to improve display for a large number of items

Multiple legends may be added to a plot

Use the ShowLegend() overload that accepts an Edge to display the legend outside the data area.

Use custom fonts from TTF files in the legend.

Use custom fonts from TTF files in the legend (manual legend items).

Place a manual legend item at the top of the list and style it as desired to achieve a title inside the legend area.

Styling Plots

How to customize appearance of plots

Background color for the entire figure or just the data area may be individually controlled. When using dark figure backgrounds it may be necessary to configure axes to use light colors

Axis labels, tick marks, and frame can all be customized.

A palette is a set of colors, and the Plot's palette defines the default colors to use when adding new plottables. https://scottplot.net/cookbook/5/palettes/ displays all palettes included with ScottPlot.

Palettes can be inverted. Palettes that work well on light backgrounds typically work well on dark backgrounds if they are inverted.

A colormap is a continuous gradient of multiple colors. It can be used to color continuous data like heatmaps and images, but colormaps may also be sampled directly to create collections of colors. https://scottplot.net/cookbook/5/colormaps/ displays all colormaps included with ScottPlot.

Many standard arrow shapes are available

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.

Hairline mode allows axis frames, tick marks, and grid lines to always be rendered a single pixel wide regardless of scale factor. Enable hairline mode to allow interactive plots to feel smoother when a large scale factor is in use.

Plots can be created using dark mode by setting the colors of major plot components to ones consistent with a dark theme.

Colormaps can be used to generate a collection of discrete colors that can be applied to plottable objects.

Colormaps can be created as a gradient between a collection of colors.

Enabling hand-drawn line style allows creation of charts that mimic XKCD style graphs which use squiggly lines for comedic effect.

A shortcut method exists to easily disable title visibility. This strategy can be used to un-hide the title later, preserving its original text.

The title is centered over the data area by default, but a flag allows users to center it relative to the figure instead

Plots can be assigned borders to draw around the figure or data area.

Set font by its name to apply it to common plot components.

Font weight can be customized.

Font slant can be customized.

Underlines may be added to label styles. Underline thickness and offset may be customized as well.

Sample Data

ScottPlot has many built-in utilities for generating sample data.

This recipe demonstrates creation of a noisy waveform containing multiple sine waves with different frequencies.

Histogram

Histograms graphically represent the distribution of numerical data by grouping values into ranges (bins) and displaying the frequency or count of points in each bin.

A histogram can be created from a collection of values.

A histogram can be created using manually defined bin sizes.

A filled histogram (one with no visible gaps between bars) can be achieved by setting the bar width to the bin size. However, anti-aliasing artifacts may cause white lines to appear between bars. Disable anti-aliasing for each bar to improve appearance of such plots.

A helper method and plot type has been created to simplify creating a bar plot that displays histogram counts. Note that updates the histogram may appear in real time and the plot will automatically update to display the latest data.

Histograms may be displayed as the probability for each value falling inside a bin

A probability curve may be generated for a Gaussian distributed sample.

A probability curve may be placed on a secondary axis to allow counts to be displayed alongside probabilities with percent units

Demonstrates how to use semitransparent bars to display histograms from overlapping datasets

A cumulative probability histogram represents the cumulative sum of probabilities or relative frequencies up to each bin, providing a running total of the probability distribution. It is especially useful for evaluating and comparing the distribution of multiple populations.

Internationalization

Using ScottPlot across cultures with different text and numeric requirements.

ScottPlot comes with font detection methods which help identify the best installed font for displaying text which may contain international characters.

The Plot's Style class contains a method which automatically sets the fonts of common plot objects to the font most likely able to display the characters they contain.

Kernel Density Estimation

Kernel Density Estimation (KDE) can be used to estimate a PDF for a histogram, allowing the creation of density plots

Density Plots use KDE to estimate a PDF.

Several choices of kernels are available.

Layout

How to customize data area size and figure padding

How to create a plot containing only the data area and no axes.

The plot can be arranged to achieve a fixed amount of padding on each side of the data area

The plot can be arranged so the data is drawn inside a fixed rectangle defined in pixel units

Multiplot

Use Multiplot to create figures with multiple subplots

Use the Multiplot class to create figures with multiple subplots.

The Multiplot's Layout property may be customized to achieve a column layout.

The Multiplot's Layout property may be customized to achieve a grid layout.

The Multiplot's Layout property may be configured to achieve a fully custom layout.

Regression

Statistical operations to fit lines to data

Fit a line to a collection of X/Y data points.

Quickstart

A survey of basic functionality in ScottPlot 5

A scatter plot can be used to display X/Y data points.

Most methods which add items to plots return the item that was added. Save the object that is returned and set its properties to customize it.

Signal plots display Y values at evenly spaced X positions. Signal plots should be used instead of Scatter plots whenever possible.

Signal plots are so performant that they can interactively display millions of data points in real time.

Plots have helper methods for quickly setting axis labels. Refer to other cookbook pages for additional axis customization options.

Plot Types

Annotation

Annotations are always-visible text labels positioned over the data area.

Annotations are labels you can place on the data area of a plot. Unlike Text added to the plot (which is placed in coordinate units on the axes), Annotations are positioned relative to the data area (in pixel units) and do not move as the plot is panned and zoomed.

Annotations can be extensively customized.

Annotations are aligned with the data area.

Arrow

Arrows point to a location in coordinate space.

Arrows can be placed on plots to point to a location in coordinate space and extensively customized.

Axis Lines

Axis lines indicate a position on an axis.

Axis lines are vertical or horizontal lines that span an entire axis.

Axis lines have labels that can be used to display arbitrary text on the axes they are attached to.

Axis line labels can have custom positioning, including rotation and alignment.

Axis lines have extensive customization options.

Axis lines will be added to the legend if their Text property is set unless their ExcludeFromLegend property is true.

Calling Plot.Axes.AutoScale() or middle-clicking the plot will set the axis limits to fit the data. By default the position of axis lines and spans are included in automatic axis limit calculations, but a flag can be set to ignore certain plottables when automatically scaling the plot.

Axis lines extend infinitely in both directions by default, but upper and lower limits may be specified to limit the dimensions of axis lines.

Axis Spans

Axis spans indicate a range of an axis.

Axis spans label a range of an axis. Vertical spans shade the full width of a vertical range, and horizontal spans shade the full height of a horizontal range.

Axis spans can be extensively customized.

Bar Plot

Bar plots represent values as horizontal or vertical rectangles

Bar plots can be added from a series of values.

A collection of bars can appear in the legend as a single item.

Set the `Label` property of bars to have text displayed above each bar.

Set the `Label` property of bars to have text displayed beside (left or right) of each bar.

Bars with labels are rendered one at a time by default, but this makes it possible for bar labels to get overlapped by other bars. Bar chars may be configured to render labels last, even above other plottables.

The exact position and size of each bar may be customized.

Bars can be labeled by manually specifying axis tick mark positions and labels.

Each bar may be individually styled.

Ultimate control of bar plot styling and positioning may be achieved by creating each bar individually, styling it as desired, and setting its exact size and location. This level of customization may be used to create extremely advanced stacked or grouped bar plots.

Bars can be positioned on top of each other.

Bars can be grouped by position and color.

Bar plots can be displayed horizontally.

Bars can be stacked to present data in groups.

Full control over bar labels may be achieved by placing fully customizable text objects on top of bars according to their dimensions.

A range chart displays a discrete set of named value ranges

Range charts may be created using horizontally oriented bars

Stacked range charts depict multiple ranges for a discrete set of items

Horizontally oriented stacked range charts may be created

Box Plot

Box plots show a distribution at a glance

Box plots can be created individually and added to the plot.

Each collection of boxes added to the plot gets styled the same and appears as a single item in the legend. Add multiple bar series plots with defined X positions to give the appearance of grouped data.

Bracket

Brackets annotate a range along a line in coordinate space

Brackets are useful for annotating linear ranges of data.

Callout

Callouts display a label and are connected with an arrow that marks a point on the plot.

Callouts display a label and are connected with an arrow that marks a point on the plot.

Contour Plot

A contour plot is a graphical representation that shows the three-dimensional surface of a function on a two-dimensional plane by connecting points of equal value with contour lines

A rectangular contour plot with evenly spaced points can be created from a 2D array of 3D points.

A contour plot can be created from a collection of 3D data points placed arbitrarily in X/Y plane.

Contour lines may be placed on top of heatmaps.

If a colormap is provided it will be used to color each line in the colormap according to its value.

Coxcomb Plot

A Coxcomb chart is a pie graph where the angle of slices is constant but the radii are not.

A Coxcomb chart is a pie graph where the angle of slices is constant but the radii are not.

Crosshair

A Crosshair combines a horizontal axis line and vertical axis line to mark a location in coordinate space.

A Crosshair combines a horizontal axis line and vertical axis line to mark a location in coordinate space.

Crosshairs can be extensively customized.

Ellipse

Ellipses are curves with a defined center and distinct X and Y radii. A circle is an ellipse with an X radius equal to its Y radius.

Ellipses can be added to plots

Circles can be added to plots. Circles are really Ellipses with the same X and Y radius. Note that circles appear as ellipses unless the plot has a square coordinate system.

For circles to always appear circular, the coordinate system must be forced to always display square-shaped pixels. This can be achieved by enabling the axis scale lock.

Ellipses styles can be extensively customized

Ellipses can also be rotated

Error Bars

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 plot

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.

A line plot with shaded error range may be achieved by layering a FillY beneath a ScatterLine.

Financial Plot

Finance plots display price data binned into 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.

OHLC charts use symbols to display price data (open, high, low, and close) for specific time ranges.

Finance charts can display price range information over arbitrary time scales.

Finance charts can be created which display price information on the right axis.

Tools exist for creating simple moving average (SMA) curves and displaying them next to finanial data.

Tools exist for creating Bollinger Bands which display weighted moving mean and variance for time series financial data.

When the DateTimes stored in OHLC objects are used to determine the horizontal position of candlesticks, periods without data like weekends and holidays appear as gaps in the plot. Enabling sequential mode causes the plot to ignore the OHLC DateTimes and display candles at integer positions starting from zero. Users can customize the tick generator to display dates instead of numbers on the horizontal axis if desired.

When the DateTimes stored in OHLC objects are used to determine the horizontal position, periods without data like weekends and holidays appear as gaps in the plot. Enabling sequential mode causes the plot to ignore the OHLC DateTimes and place OHLCs at integer positions starting from zero. Users can customize the tick generator to display dates instead of numbers on the horizontal axis if desired.

Stock symbol information can be displayed beneath the plot using the background text feature.

Stock symbol information can be displayed beneath the plot using the multiline background text feature.

A dark mode finance plot can be achieved by customizing color options of the candles and figure.

A special axis system has been created for financial charts. Unlike standard DateTime axes which assume the horizontal scale is linearly spaced time, the financial DateTime system allows for dates to be skipped. This is ideal for financial charts where date ranges are skipped such as after-hours trading or non-trading days.

Function

Function plots are a type of line plot where Y positions are defined by a function that depends on X rather than a collection of discrete data points.

Create a function plot from a formula.

A function can be limited to a range of X values.

When a function cannot be represented as a static method (e.g., one that requires custom parameters) it can be represented as variable of type Func

<double, double=""> and plotted accordingly.</double,>

Heatmap

Heatmaps display values from 2D data as an image with cells of different intensities

Heatmaps can be created from 2D arrays

Heatmaps can be inverted by reversing the order of colors in the colormap

A heatmap's Colormap is the logic used to convert from cell value to cell color and they can set by the user. ScottPlot comes with many common colormaps, but users may implement IColormap and apply their own. A colorbar can be added to indicate which colors map to which values.

Custom colormaps may include transparency.

Multiple colorbars may be added to plots.

A colorbar displays a colormap on an edge of the plot, and it has an optional label which can be customized to display a title.

Colorbars have an optional custom tick formatter that allows users to control the string format of tick labels.

Heatmaps can be flipped horizontally and/or vertically

Enable the `Smooth` property for anti-aliased rendering

Assign double.NaN to a heatmap cell to make it transparent.

The transparency of the entire heatmap can be adjusted.

An alpha map (a 2d array of byte values) can be used to apply custom transparency to each cell of a heatmap.

A frameless heatmap can be achieved by disabling axis labels and ticks, then setting the margins to 0 so the data area tightly fits the data.

Heatmap cells are aligned in their centers by default. This means that the bottom left cell will be centered at (0, 0), and its lower left corner will be to the lower left of the origin. Setting sell alignment to lower left causes the lower left of the heatmap to be exactly at (0, 0).

Dimensions of a heatmap may be set by specifying how large a cell should be in pixel units.

Dimensions of a heatmap may be set by defining a rectangle that the heatmap will be rendered inside.

The user can define the range of values to represent with colors in the colormap. Values outside that range will be clipped to the nearest color in the colormap.

Text may be placed over cells to provide cell labels. In interactive applications MouseMove events may be used to remove old labels and only display a label over the cell beneath the mouse. See the ScottPlot Demo page for more information and code samples.

Heatmaps can be displayed on plots which use dates instead of numbers on the horizontal axis.

Images

Images can be placed on plots in a variety of ways

An image can be drawn inside a rectangle defined in coordinate units.

Interactive

Interactive plottables interact with the mouse without requiring the user to manually wire mouse tracking.

Two draggable points with a straight line between them.

Horizontal line segments can be expanded horizontally by dragging the left and right edges, or slid vertically by dragging the center line.

Vertical line segments can be expanded vertically by dragging the top and bottom edges, or slid horizontally by dragging the center line.

An interactive vertical line has an X position and extends to infinity along the Y axis.

An interactive horizontal line has a Y position and extends to infinity along the X axis.

Interactive vertical and horizontal spans let the user select ranges along the vertical and horizontal axes, respectively.

Interactive markers respond to hover events and can be dragged.

Interactive rectangles can be resized by dragging their edges or repositioned by dragging their bodies

Line Plot

Line plots can be placed on the plot in coordinate space using a Start, End, and an optional LineStyle.

Line plots are placed with a start and end location in coordinate space. Their styles can be customized.

Line plots can be styled using a LineStyle.

Line plots with labels appear in the legend.

Markers may be displayed at the ends of lines, and a flag controls whether the markers are drawn above or below the line.

Live Data

Plottables like DataLogger and DataStreamer are designed for displaying datasets that change in real time. They have the ability to control axis limits to ensure the latest data is always in view. See the ScottPlot Demo for live example of these plot types.

Use a DataLogger to display growing datasets (such as sensor data). This plot type assumes that new data will always be added to the end of the existing data, so like SignalXY new data points must have an X value that is greater to or than or equal than the previous one. See the ScottPlot Demo for a live example of this plot type.

Use a DataStreamer to display streaming data using a fixed-length display with a fixed horizontal distance between points. This type of plot is ideal for signals like ECG (heart monitor) waveforms. This plot type has advanced customizations for controlling how new data replaces old data (e.g., slide the old data to the left as new data appears on the right or place new data values from left to right, then wrap around to the start and wipe away the oldest data values by replacing them from left to right again). See the ScottPlot Demo for a live example of this plot type.

Values accumulated by a data logger may be edited after they are acquired.

Lollipop Plot

A lollipop chart is a variation of a bar chart that uses a line (stem) extending from a baseline to a marker (head) to represent data points. Lollipop highlight individual data points with less visual clutter than to traditional bar charts.

Lollipop plots can be created from a sequence of values

The position of each lollipop may be defined.

The stem line and head marker can be extensively customized.

Change the lollipop plot's Orientation to Horizontal to cause stems to be drawn horizontally instead of vertically.

Marker

Markers can be placed on the plot in coordinate space.

Markers are symbols placed at a location in coordinate space. Their shape, size, and color can be customized.

Standard marker shapes are provided, but advanced users are able to create their own as well.

Markers with labels appear in the legend.

Collections of markers that are all styled the same may be added to the plot

A colormap may be used to style a collection of markers

An ImageMarker can be placed on the plot to display an image centered at a location in coordinate space.

Markers composed of lines only do not have fill properties.

Markers with fills support customization.

Phasor Plot

Phasor plots display vectors on a radial axis centered at the origin

A phasor line plot contains a collection of polar coordinates which are rendered as arrows.

Text labels may be applied to individual arrows of a phasor plot.

Pie

Pie charts illustrate numerical proportions as slices of a circle.

A pie chart can be created from a few values.

A pie chart can be created from a collection of slices.

A donut chart is a pie chart with an open center. Donut charts can be created from a collection of slices.

Individual slices may be given a custom hatch style

Pie charts may be rotated to control where the first slice begins.

Slice labels can be displayed centered with the slice at a customizable distance from the center of the pie.

Slice labels may be adapted to display any text (including numerical values) centered over each slice.

Pie slices may have labels independent from those displayed in the legend.

Polar Axis

Create a polar axis and add it to the plot to display data on a circular coordinate system.

A polar axis can be added to the plot, then other plot types (marker, line, scatter, etc.) can be placed on top of it using its helper methods to translate polar coordinates to Cartesian units.

A polar axis may be rotated to define the angle of the 0 degree spoke.

Clockwise polar plots are common for representing spatial orientation.

Arrows can be placed on a polar coordinate system with their base at the center and their tips used to indicate points in polar space. The Phaser plot type uses this strategy to display collections of similarly styled arrows.

The lines of polar axes may be extensively styled. Polar axes have radial spokes (straight lines that extend from the origin to the maximum radius) and circular axis lines (concentric circles centered at the origin).

The background style of polar axes may be customized

The length of spokes may be customized. Spoke length is expressed as a fraction of the polar axis radius.

Polar axis spokes may be individually labeled.

Polar axis ticks are marked by circles which may be individually labeled.

The angle and length of spokes and position of circles can be manually defined. Each spoke and circle may also be individually styled.

Combining a polar axis with polygons is an alternative strategy for building radar plots.

Modifies the padding of labels on polar spokes.

This is an example of a polar axis with lines instead of points

Population Plot

Population plots display collections of individual values.

A Population can be created from a collection of values, styled as desired, and placed anywhere on the plot.

Population statistics can be displayed using box plots.

The values displayed by the box midline, body, and whisker can be configured by assigning a static function to the box value configuration property.

The bar symbol in population plots can be extensively styled.

The box symbol in population plots can be extensively styled.

The data markers in population plots can be extensively styled.

The user may customize where data is drawn relative to the bar or box. Centering everything can be used to achieve an effect where data points are drawn over the bar or box.

Groups of populations can be achieved by customizing position, color, axis labels, and legend items.

Radar Plot

Radar charts (also called a spider charts or star charts) represent multi-axis data as a 2D shape on axes arranged circularly around a center point.

A radar chart can be created from a single array of values.

A single radar chart can be used to display values from multiple series using a 2D array

Collections of radar values (radar series) can be labeled so they appear in the legend

Radar plots have a collection of RadarSeries objects which each describe a set of values and the styling information used to display it as a shape on the radar plot. Users may change properties of radar series objects to achieve a high level of customization over each shape.

Labels can be assigned to spokes to label values around the circumference of the radar plot

Radar radial tick positions and labels may be defined by the user

Radial ticks may be rendered using straight lines instead of circles

Radar charts can be customized so the axis is rendered on top of the data

Radial gauge

A radial gauge chart displays scalar data as circular gauges.

A radial gauge chart can be created from a few values.

Gauge colors can be customized by changing the default palette.

Radial gauge plots support positive and negative values.

Sequential gauge mode indicates that the base of each gauge starts at the tip of the previous gauge.

Gauges are displayed from the center outward by default but the order can be customized.

The SingleGauge mode draws all gauges stacked together as a single gauge. This is useful for showing a progress gauges composed of many individual smaller gauges.

The direction of gauges can be customized. Clockwise is used by default.

The empty space between gauges can be adjusted as a fraction of their width.

The starting angle for gauges can be customized. 270 for North (default value), 0 for East, 90 for South, 180 for West, etc.

By default gauges are full circles (360 degrees) but smaller gauges can be created by customizing the gauge size.

The value of each gauge is displayed as text by default but this behavior can be overridden. Note that this is different than the labels fiels which is what appears in the legened.

Gauge level text is positioned at the tip of each gauge by default, but this position can be adjusted by the user.

Size of the gauge level text as a fraction of the gauge width.

Level text fonts may be customized.

Radial gauge labels will appear in the legend if they are assigned.

By default the full range of each gauge is drawn as a semitransparent ring. The amount of transparency can be adjusted as desired.

Gauge backgrounds are drawn as full circles by default. This behavior can be disabled to draw partial backgrounds for non-circular gauges.

Scale Bar

Scalebars display a horizontal and/or vertical range using a line segment and may be used to convey axis scale as a minimal alternative to using axis frames, ticks, and tick labels.

A ScaleBar can be added to a plot to convey scale information allowing axis frames, ticks, and labels to be hidden.

Text may be added to each dimension of an L shaped scalebar

The ScaleBar has many properties which may be customized

Set Width or Height to 0 to cause the ScaleBar to use a single axis only

Scatter Plot

Scatter plots display points at X/Y locations in coordinate space.

Scatter plots can be created from two arrays containing X and Y values.

Scatter plots can be created from a collection of Coordinates.

Scatter plots can be created from any numeric data type, not just double.

Scatter plots can be created from Lists, but be very cafeful not to add or remove items while a render is occurring or you may throw an index exception. See documentation about the Render Lock system for details.

The `ScatterLine()` method can be used to create a scatter plot with a line only (marker size is set to 0).

The `ScatterPoints()` method can be used to create a scatter plot with markers only (line width is set to 0).

Scatter plots can be extensively styled by interacting with the object that is returned after a scatter plot is added. Assign text to a scatter plot's Label property to allow it to appear in the legend.

Several line patterns are available

Scatter plots support generic data types, although double is typically the most performant.

A scatter plot may use DateTime units but be sure to setup the respective axis to display using DateTime format.

Scatter plots can be created using a step plot display where points are connected with right angles instead of diagnal lines. The direction of the steps can be customized.

NaN values in a scatter plot's data will appear as gaps in the line.

Scatter plots draw straight lines between points by default, but setting the Smooth property allows the scatter plot to connect points with smooth lines. Lines are smoothed using cubic spline interpolation.

Tension of smooth lines can be adjusted for some smoothing strategies. Low tensions lead to 'overshoot' and high tensions produce curveswhich appear more like straight lines.

The quadratic half point path strategy allows scatter plots to be displayed with smooth lines connecting points, but lines are eased in and out of points so they never 'overshoot' the values vertically.

Although a scatter plot may contain a very large amount of data, much of it may be unpopulated. The user can define min and max render indexes, and only values within that range will be displayed when the scatter plot is rendered.

The area beneath a scatter plot can be filled.

The base of the fill can be defined.

Filled areas above and below the FillY value can be individually customized

The area beneath a scatter plot can be filled with a custom gradient of colors.

Scatter plots may be filled with vertical gradients.

Scatter plot points can be multiplied by custom X and Y scale factors, or shifted horizontally or vertically using X and Y offset values.

A stacked filled line plot effect can be achieved by overlapping ScatterLines that fill area.

Demonstrates how to combine filled scatter plots with vertical and horizontal offsets to achieve an interesting visual effect.

Shapes

Basic shapes that can be added to plots

A rectangle can be added to the plot and styled as desired.

A circle can be placed on the plot and styled as desired.

An ellipse can be placed on the plot and styled as desired.

Polygon plots can be added from a series of vertices, and must be in clockwise order.

Polygon plots can be fully customized.

A stacked line chart may be achieved by combining primitive shapes onto a plot.

An arc is a curve along the partial circumference of a circle. The circle starts at the far right and extends counter-clockwise.

An elliptical arc is a curve along the partial circumference of an ellipse. The ellipse starts at the far right and extends counter-clockwise.

A circle sector is the 2D shape formed by the area inside a circle between an arc around its circumference and its center point.

An ellipse sector is the 2D shape formed by the area inside an ellipse between an arc around its edge and its center point.

An annular sector is the 2D shape between two circles (like a donut) and may be sliced to contain only the area between two angles relative to the center point.

An annular elliptical sector is the 2D shape between two ellipses and may be sliced to contain only the area between two angles relative to the center point.

Signal Plot

Signal plots display evenly-spaced data

Signal plots are best for extremely large datasets. They use render using special optimizations that allow highspeed interactivity with plots containing millions of data points.

Signal plots can be styled in a variety of ways.

Signal plots can be offset by a given X and Y value.

Signal plots can be scaled vertically according to a user-defined amount.

Signal plots can have markers displayed at each point which are only visible when the plot is zoomed in.

Even if a signal plot references a large array of data, rendering can be limited to a range of values. If set,only the range of data between the minimum and maximum render indexes will be displayed.

Signal plots support generic data types, although double is typically the most performant.

A signal plot may use DateTime units but be sure to setup the respective axis to display using DateTime format.

SignalConst

SignalConst is a type of signal plot which contains immutable data points and occupies more memory but offers greater performance for extremely large datasets. It is rarely needed, but best use for plotting data containing millions of points.

SignalConst can display data with millions of points at high framerates, ideal for interactive manipulation of large datasets.

SignalXY Plot

SignalXY are a high performance plot type optimized for X/Y pairs where the X values are always ascending. For large datasets SignalXY plots are much more performant than Scatter plots (which allow unordered X points) but not as performant as Signal plots (which require fixed spacing between X points).

SignalXY plots are a high performance plot type for X/Y data where the X values are always ascending.

SignalXY plots support arrays with generic data types, although double is typically the most performant.

SignalXY plots support generic lists.

SignalXY plots can display unevenly spaced time series data using a DateTime horizontal axis.

Even if a SignalXY plot references a large array of data, rendering can be limited to a range of values. If set,only the range of data between the minimum and maximum render indexes will be displayed.

A fixed offset can be applied to SignalXY plots.

SignalXY plots can be scaled vertically according to a user-defined amount.

Although SignalXY plots typically display data left-to-right, it is possible to use this plot type to display data bottom-to-top.

Demonstrates how to display a rotated SignalXY plot (so it goes from bottom to top) which is also displayed on an inverted horizontal axis (where positive values are on the left).

Demonstrates how to display a rotated SignalXY plot on an inverted vertical axis so data goes from top to bottom.

Users can enable a marker to be displayedat each data point. However, this can reduce performance for extremely large datasets.

Smith Chart

Create a Smith chart axis and add it to the plot to display impedance of RF signals using a horizontal axis indicating resistance and vertical axis indicating reactance.

Add a Smith chart to the plot and use its methods to translate impedance to Cartesian coordinates that can be used for placing other plot components.

Text

Text labels can be placed on the plot in coordinate space

Text can be placed anywhere in coordinate space.

Text formatting can be extensively customized.

Multiline labels have a default line height estimated from the typeface and font size, however line height may be manually defined by the user.

The offset properties can be used to fine-tune text position in pixel units

Tooltip

Tooltips are annotations that point to an X/Y coordinate on the plot.

Tooltips are annotations that point to an X/Y coordinate on the plot.

Tooltips fonts can be customized.

Tooltips border and fill styles can be customized.

Customizable tooltip tail width percentage. The actual width of the tail is the lesser of the length or width of the tooltip body.

The shape of tooltips automatically adjusts according to the position of the tip relative to the label.

Triangular Axis

Create a triangular axis and add it to the plot to display data on a triangular coordinate system.

Create a triangular axis and add it to the plot to display data on a triangular grid, and interact with it to convert triangular units into Cartesian coordinates that can be used for placing any plot type on top.

Triangular axes typically ascend in a clockwise direction for general applications, but triangular plots with counterclockwise labeling are sometimes used for geological applications.

Triangular axis background and grid lines may be customized.

Styling options for edge lines, tick marks, tick labels, and title text may be customized individually for each axis.

Triangular axis edges have a helper method to easily add a title and color all the edge components similarly.

Vector Field

Vector fields display a collection of vectors rooted at points in coordinate space

Vectors (representing a magnitude and direction) can be placed at specific points in coordinate space to display as a vector field.

Vector field arrows can be colored according to their magnitude.

Length of arrows in a vector field may be customized by defining length (in pixel units) to display the longest vector.