ScottPlot
The control back end module contains all the logic required to manage a mouse-interactive
plot to display in a user control. However, this module contains no control-specific dependencies.
User controls can instantiate this object, pass mouse and resize event information in, and have
renders triggered using events.
This event is invoked when an existing Bitmap is redrawn.
e.g., after rendering following a click-drag-pan mouse event.
This event is invoked after a new Bitmap was created.
e.g., after resizing the control, requiring a new Bitmap of a different size
This event is invoked when the cursor is supposed to change.
Cursor changes may be required when hovering over draggable plottable objects.
This event is invoked when the axis limts change.
This is typically the result of a pan or zoom operation.
This event is invoked when the user right-clicks the control with the mouse.
It is typically used to deploy a context menu.
This event is invoked after the mouse moves while dragging a draggable plottable.
This event is invoked after the mouse moves while dragging a draggable plottable.
The control configuration object stores advanced customization and behavior settings
for mouse-interactive plots.
True if the middle mouse button is pressed
True if the right mouse button is pressed
True if the left mouse button is pressed
Current position of the mouse in pixels
Current position of the mouse in pixels
Holds the plottable actively being dragged with the mouse.
Contains null if no plottable is being dragged.
True when a zoom rectangle is being drawn and the mouse button is still down
True if a zoom rectangle is being actively drawn using ALT + left click
The plot underlying this control.
The settings object underlying the plot.
The latest render is stored in this bitmap.
New renders may be performed on this existing bitmap.
When a new bitmap is created, this bitmap will be stored in OldBitmaps and eventually disposed.
Bitmaps that are created are stored here so they can be kept track of and
disposed properly when new bitmaps are created.
Store last render limits so new renders can know whether the axis limits
have changed and decide whether to invoke the AxesChanged event or not.
Unique identifier of the plottables list that was last rendered.
This value is used to determine if the plottables list was modified (requiring a re-render).
This is set to True while the render loop is running.
This prevents multiple renders from occurring at the same time.
The style of cursor the control should display
The events processor invokes renders in response to custom events
The event factor creates event objects to be handled by the event processor
Number of times the current bitmap has been rendered on.
Total number of renders performed.
Note that at least one render occurs before the first request to measure the layout and calculate data area.
This means the first render increments this number twice.
Tracks the total distance the mouse was click-dragged (rectangular pixel units)
True if the mouse was dragged (with a button down) long enough to quality as a drag instead of a click
Indicates whether Render() has been explicitly called by the user.
Renders requested by resize events do not count.
Variable name for the user control tied to this backend.
Create a back-end for a user control
initial bitmap size (pixels)
initial bitmap size (pixels)
variable name of the user control using this backend
The host control may instantiate the back-end and start sending it events
before it has fully connected its event handlers. To prevent processing events before
the host is control is ready, the processor will be stopped until is called by the host control.
Reset the back-end by creating an entirely new plot of the given dimensions
Reset the back-end by replacing the existing plot with one that has already been created
Return a copy of the list of draggable plottables
Return the draggable plottable under the mouse cursor (or null if there isn't one)
Return a multi-line string describing the default mouse interactions.
This can be useful for displaying a help message in a user control.
Return the most recently rendered Bitmap.
This method also disposes old Bitmaps if they exist.
Render onto the existing Bitmap.
Quality describes whether anti-aliasing will be used.
Add error text on top of the rendered plot
Request a render using the render queue.
This method does not block the calling thread.
Check if the number of plottibles has changed and if so request a render.
This is typically called by a continuously running timer in the user control.
Resize the control (creates a new Bitmap and requests a render)
new width (pixels)
new height (pixels)
Render using the queue (best for mouse events), otherwise render immediately.
Indicate a mouse button has just been pressed
Return the mouse position on the plot (in coordinate space) for the latest X and Y coordinates
Return the mouse position (in pixel space) for the last observed mouse position
Indicate the mouse has moved to a new position
Process an event using the render queue (non-blocking) or traditional rendering (blocking)
based on the UseRenderQueue flag in the Configuration module.
Call this when the mouse moves without any buttons being down.
It will only update the cursor based on what's beneath the cursor.
Set the cursor based on whether a draggable is engaged or not,
then invoke the CursorChanged event.
Indicate a mouse button has been released.
This may initiate a render (and/or a delayed render).
Indicate the left mouse button has been double-clicked.
The default action of a double-click is to toggle the benchmark.
Apply a scroll wheel action, perform a low quality render, and later re-render in high quality.
Control whether panning is enabled
Control whether zooming is enabled (via left-click-drag, middle-click-drag, and scrollwheel)
Manual override to set anti-aliasing (high quality) behavior for all renders.
Refer to the QualityConfiguration field for more control over quality in response to specific interactions.
This module customizes anti-aliasing (high quality) behavior in response to interactive events.
Control whether left-click-drag panning is enabled
Control whether right-click-drag zooming is enabled
Control whether scroll wheel zooming is enabled
Fractional amount to zoom in or out when the mouse wheel is scrolled.
Value must be between 0 and 1 (default is 0.15).
Number of milliseconds after low quality scroll wheel zoom to re-render using high quality
Control whether middle-click-drag zooming to a rectangle is enabled
Control whether middle-click can be used to reset axis limits
Horizontal margin between the edge of the data and the edge of the plot when middle-click AutoAxis is called
Vertical margin between the edge of the data and the edge of the plot when middle-click AutoAxis is called
If enabled, double-clicking the plot will toggle benchmark visibility
If enabled, the vertical axis limits cannot be modified by mouse actions
If enabled, the horizontal axis limits cannot be modified by mouse actions
If enabled the control will automatically re-render as plottables are added and removed
Controls whether or not a render event will be triggered if a change in the axis limits is detected
Permitting dropped frames makes interactive mouse manipulation feel faster
If true, control interactions will be non-blocking and renders will occur after interactions.
If false, control interactions will be blocking while renders are drawn.
Distance (in pixels) the mouse can travel with a button held-down for it to be treated as a click (not a drag).
A number slightly above zero allows middle-click to call AxisAuto() even if it was draged a few pixels by accident.
Now that the timer-based auto-render functionality has been removed users must manually call Render() at least once.
This option controls whether a warning message is shown if the user did not call Render() manually.
Control whether the plot should be stretched when DPI scaling is in use.
Enabling stretching may result in blurry plots.
Disabling stretching may results in plots with text that is too small.
DPI scaling ratio to use for plot size and mouse tracking.
Will return 1.0 if is enabled.
This event is invoked whenever the display scale is changed.
Set the DpiStretchRatio to that of the active display.
Call this if you suspect DPI scaling has changed.
This class detects and stores display scale.
The scale ratio is used to calculate plot size and
translate mouse coordinates to real pixel coordinates.
Scale ratio in use by the active display.
This ratio is used when scaling is enabled.
Scale ratio to use if scaling is disabled.
Control whether the plot bitmap should be stretched if display scaling is active.
When enabled text will be large but may be blurry.
When disabled text will be sharp but may be too small to read on high-resolution displays.
Current display scale ratio.
This event is invoked whenever the display scale is changed.
Update the scale ratio using that of the active display.
Call this method if you expect the display scale has changed.
This class takes details about interactions and builds them into event objects which can
be passed into the event processor for processing/rendering when the render queue is free.
This event processor process incoming events and invokes renders as needed.
This class contains logic to optionally display a fast preview render and a delayed high quality render.
List of events that have not yet been processed
The event processor loop will hang infinitely until this is set to True
This timer is used for delayed rendering.
It is restarted whenever an event is processed which requests a delayed render.
This is true while the processor is processing events and/or waiting for a delayed render.
Time to wait after a low-quality render to invoke a high quality render
When a render is required this Action will be invoked.
Its argument indicates whether low quality should be used.
Create a processor to invoke renders in response to incoming events
Action to invoke to perform a render. Bool argument is LowQuality.
Milliseconds after low-quality render to re-render using high quality.
Perform a high quality render.
Call this instead of the action itself because this has better-documented arguments.
Perform a low quality render.
Call this instead of the action itself because this has better-documented arguments.
Add an event to the queue and process it when it is ready.
After all events are processed a render will be called automatically by the queue processor.
Perform a low quality preview render if the render type allows it
Perform a final high quality render if the render type allows it.
Return False if the final render needs to happen later
Process every event in the queue.
A render will be executed after each event is processed.
A slight delay will be added between queue checks.
This event describes what happens when the mouse button is lifted after
middle-click-dragging a rectangle to zoom into. The coordinates of that rectangle
are calculated, and the plot's axis limits are adjusted accordingly.
This event toggles visibility of the benchmark.
This event is typically called after double-clicking the plot.
This event calls AxisAuto() on all axes.
This is typically called after middle-clicking.
This event occurs when the user is actively middle-click-dragging to zoom.
A zoom window is drawn on the screen, but axis limits have not yet been changed.
This event describes represents interactive panning.
It is assume the plot has already been reset to the pre-mouse-interaction state,
and processing of this event pans the plot on the axes according to the distance
the mouse has moved.
This is typically called on MouseMove events when the left button is held down.
This event describes a zoom operation performed by scrolling the mouse wheel.
This event is called after the mouse button is lifted (typically following panning and zooming).
It assumes all the axis manipulation (panning/zooming) has already been performed,
and the purpose of this event is only to request an immediate high quality render.
This event describes represents interactive zooming.
It is assume the plot has already been reset to the pre-mouse-interaction state,
and processing of this event zooms the plot on the axes according to the distance
the mouse has moved.
This is typically called on MouseMove events when the right button is held down.
This event describes what happens when a draggable plottable (like an axis line)
has been moved from its initial position. This event places the plottable of interest
at the current mouse position.
This is typically called on MouseMove events while left-click-dragging a draggable plottable.
This class defines the quality to use for renders after different interactive events occur.
Programmatically-triggered events typically use high quality mode (anti-aliasing enabled).
Real-time mouse-interactive events like zooming and panning typically use low quality mode.
It is possible to automatically render using high quality after a period of inactivity.
Anti-aliasing always off
Anti-aliasing off while dragging (more responsive) but on otherwise
Anti-aliasing always on
Describes an X/Y position in coordinate space
True as lone as neither coordinate is NaN or Infinity
Return the distance to another coordinate (in coordinate units)
Generates an array of numbers with constant spacing.
The number of points
The space between points. Default 1.
The first point. Default 0
An array of numbers with constant spacing.
Generates an array of sine values of an input array.
The arguments to the sine function.
A number to multiply the output by. Default 1.
An array of sine values
Generates an array of sine values.
The number of values to generate.
The number of periods. Default 1.
The number to increment the output by. Default 0.
The number to multiply the output by. Default 1.
The fraction of a period to offset by. Default 0.
An array of sine values
Return data for a sine wave that increases frequency toward the end of an array.
This function may be useful for inspecting rendering artifacts when data is displayed at different densities.
The number of values to generate.
Increasing this value increases maximum frequency.
An array of values
Generates an array of cosine values of an input array.
The arguments to the cosine function.
A number to multiply the output by. Default 1.
An array of cosine values
Generates an array of cosine values.
The number of values to generate.
The number of periods. Default 1.
The number to increment the output by. Default 0.
The number to multiply the output by. Default 1.
The fraction of a period to offset by. Default 0.
An array of cosine values
Generates an array of tangent values of an input array.
The arguments to the tangent function.
A number to multiply the output by. Default 1.
An array of tangent values
Generates an array of random numbers following a uniform distribution on the interval [offset, multiplier].
The Random object to use.
The number of random points to generate.
The maximum number above offset that may be generated.
The minimum number that may be generated.
An array of random numbers.
Generates a 2D array of random numbers between 0 and 1 (uniform distribution)
The Random object to use.
number of rows (dimension 0)
number of columns (dimension 1)
Multiply values by this number after generation
Add to values after multiplication
2D array filled with random numbers
Generates an array of random numbers following a uniform distribution on the interval [offset, multiplier].
The Random object to use.
The number of random points to generate.
The maximum number above offset that may be generated.
The minimum number that may be generated.
An array of random numbers.
Generates a single value from a normal distribution.
The Random object to use.
The mean of the distribution.
The standard deviation of the distribution.
The maximum distance from the mean to generate, given as a multiple of the standard deviation.
A single value from a normal distribution.
Generates an array of values from a normal distribution.
The number to seed the random number generator with.
The number of points to generate.
The mean of the distribution.
The standard deviation of the distribution.
The maximum distance from the mean to generate, given as a multiple of the standard deviation.
An array of values from a normal distribution.
Generates an array of values from a normal distribution.
The Random object to use.
The number of points to generate.
The mean of the distribution.
The standard deviation of the distribution.
The maximum distance from the mean to generate, given as a multiple of the standard deviation.
An array of values from a normal distribution.
Generates an array of data with normally distributed residuals about a line.
The Random object to use.
The number of points to generate. Default 100.
The slope of the line. Default 1.
The y-intercept of the line. Default 0.
The standard deviation of the residuals. Default 0.1
An array of approximately linear data.
Generates an array of data with uniformally distributed residuals about a sinusoidal curve.
The Random object to use.
The number of points to generate.
The number of periods. Default 1.
Twice the maximum residual, in units of mult. Default 0.5
The number to multiply the residuals by. Default 1.
An array of approximately sinusoidal data.
Generates a random color.
The Random object to use.
The min of each component. Default 0.
The max of each component. Default 255.
A random color.
Return the cumulative sum of a random set of numbers using a fixed seed
The number of points to generate.
The max difference between points in the walk. Default 1.
The first point in the walk. Default 0.
The cumulative sum of a random set of numbers.
Return the cumulative sum of a random set of numbers.
The random object to use.
The number of points to generate.
The max difference between points in the walk. Default 1.
The first point in the walk. Default 0.
The cumulative sum of a random set of numbers.
Generate unevenly-spaced X/Y points.
X values walk upward (by values from 0 to 1)
Y values walk randomly (by values from -1 to 1)
Return OHLC array with random prices X positions as DateTime.ToOATime() values using the given time delta
The random object to use.
The number of prices to generate.
The difference in time between prices.
The max difference between base prices around which that day's prices independently vary. Default 10.
The initial base price. Default 123.45
OHLC array with random prices
Return OHLC array with random prices X positions as sequential numbers (0, 1, 2, etc.)
The random object to use.
The number of prices to generate.
The max difference between base prices around which that day's prices independently vary. Default 10.
The initial base price. Default 123.45
OHLC array with random prices
Return OHLC array with random prices X positions as sequential numbers (0, 1, 2, etc.)
The random object to use.
The number of prices to generate.
The max difference between base prices around which that day's prices independently vary. Default 10.
The initial base price. Default 123.45
The minutes between prices. Cumulative with deltaDays. Default 0.
The days between prices. Cumulative with deltaMinutes. Default 1.
Whether to use TimeSpan or integer x axis.
OHLC array with random prices
Generates a random span.
The random object to use.
The minimum of the span. Default 0.
Tge naximum of the span. Default 100.
The minimum length of the span. Default 10.
A random span.
Generates a range of values starting at 0 and separated by 1.
The end of the range.
A range of values.
Generates a range of values separated by 1.
The start of the range.
The end of the range.
A range of values.
Generates a range of values.
The start of the range.
The end of the range.
The space between values.
Indicates whether to include the stop point in the range. Default false.
A range of values.
Generates an array of zeros
The number of zeroes to generate
An array of zeros
Generates an array of ones
The number of ones to generate
An array of ones
Generates a Bitmap from data on the range [0, 255]
The data to use.
The colormap to use.
A Bitmap
Generates a sample Bitmap.
A sample Bitmap
Returns a sample 2D array of grayscale values.
2D array of grayscale values.
Recording of a neuronal action potential (100 ms, 20 kHz sample rate, mV units)
Recording of a neuronal action potential
Name of this colormap
Create new instances of every colormap and return them as an array.
Return the names of all available colormaps.
Create a new colormap by its name.
colormap name
if false the default colormap (Viridis) will be returned
Return a bitmap showing the gradient of colors in a colormap.
Defining min/max will create an image containing only part of the colormap.
Return the display scale ratio being used.
A scaling ratio of 1.0 means scaling is not active.
Return the X and Y distance (pixels) necessary to translate the canvas for the given text/font/alignment
Returns a font name guaranteed to be installed on the system
Returns a font name guaranteed to be installed on the system
Return Xs and Ys for 2 polygons representing the input data above and below the given baseline
Vertical (upper/middle/lower) and Horizontal (left/center/right) alignment
X/Y coordinates define the base of the arrow
X/Y coordinates define the center of the arrow
X/Y coordinates define the tip of the arrow
Defines if/how axis scales (units per pixel) are matched between horizontal and vertical axes.
Horizontal and vertical axes can be scaled independently.
Squares and circles may stretch to rectangles and ovals.
Axis scales are locked so geometry of squares and circles is preserved.
After axes are set, the vertical scale (units per pixel) is applied to the horizontal axis.
Axis scales are locked so geometry of squares and circles is preserved.
After axes are set, the horizontal scale (units per pixel) is applied to the vertical axis.
Axis scales are locked so geometry of squares and circles is preserved.
After axes are set, the largest scale (most units per pixel) is applied to both axes.
Apply the most zoomed-out scale to both axes.
Apply the scale of the larger axis to both axes.
Apply the scale of the smaller axis to both axes.
Defines how an image will be placed in Radar and CoxComb charts
Images will be aligned at the arms of the chart
Images will be aligned halfway in the space between arms of the chart
Successive gauges start outward from the center but start at the same angle
Successive gauges start outward from the center and start at sequential angles
Gauges are all the same distance from the center but start at sequential angles
Describes how a render should be performed with respect to quality.
High quality enables anti-aliasing but is slower.
Some options describe multiple renders, with or without a delay between them.
Only render using low quality (anti-aliasing off)
Only render using high quality (anti-aliasing on)
Perform a high quality render after a delay.
This is the best render type to use when resizing windows.
Render low quality and display it, then if no new render requests
have been received immediately render a high quality version and display it.
This is the best render option to use when requesting renders programmatically
Render low quality and display it, wait a small period of time for new render requests to arrive,
and if no new requests have been received render a high quality version and display it.
This is the best render option to use for mouse interaction.
Process mouse events only (pan, zoom, etc) and do not render graphics on a Bitmap,
then if no new requests have been received render using the last-used render type.
Create a new color palette from an array of HTML colors
Return an array containing every available style
Describes an X/Y position in pixel space
True as lone as neither coordinate is NaN or Infinity
Return the distance to another pixel (in pixel units)
Shift the pixel location by the given deltas
PlotDimensions supplies figure dimensions and pixel/coordinate lookup methods for a single 2D plane
Text placed at a location relative to the data area that does not move when the axis limits change
Horizontal location (in pixel units) relative to the data area
Vertical position (in pixel units) relative to the data area
Text displayed in the annotation
An arrow with X/Y coordinates for the base and the tip
Location of the arrow base in coordinate space
Location of the arrow base in coordinate space
Color of the arrow and arrowhead
Thickness of the arrow line
Style of the arrow line
Label to appear in the legend
Width of the arrowhead (pixels)
Height of the arrowhead (pixels)
The arrow will be lengthened to ensure it is at least this size on the screen
Marker to be drawn at the base (if MarkerSize > 0)
Size of marker (in pixels) to draw at the base
Location of the line (Y position if horizontal line, X position if vertical line)
If True, the position will be labeled on the axis using the PositionFormatter
Font to use for position labels (labels drawn over the axis)
Color to use behind the position labels
If true the position label will be drawn on the right or top of the data area.
This method generates the position label text for numeric (non-DateTime) axes.
For DateTime axes assign your own format string that uses DateTime.FromOADate(position).
Position of the axis line in DateTime (OADate) units.
Indicates whether the line is horizontal (position in Y units) or vertical (position in X units)
If true, AxisAuto() will ignore the position of this line when determining axis limits
Text that appears in the legend
Indicates whether this line is draggable in user controls.
Cursor to display while hovering over this line if dragging is enabled.
If dragging is enabled the line cannot be dragged more negative than this position
If dragging is enabled the line cannot be dragged more positive than this position
This event is invoked after the line is dragged
The lower bound of the axis line.
The upper bound of the axis line.
Move the line to a new coordinate in plot space.
new X position
new Y position
This argument is ignored
Return True if the line is within a certain number of pixels (snap) to the mouse
mouse position (coordinate space)
mouse position (coordinate space)
snap distance (pixels)
snap distance (pixels)
Shaded horizontal region between two X values
Shade the region between two Y values
If true, AxisAuto() will ignore the position of this span when determining axis limits
This event is invoked after the line is dragged
Return True if either span edge is within a certain number of pixels (snap) to the mouse
mouse position (coordinate space)
mouse position (coordinate space)
snap distance (pixels)
snap distance (pixels)
Move the span to a new coordinate in plot space.
new X position
new Y position
if True, both edges will be moved to maintain the size of the span
Bar plots display a series of bars.
Positions are defined by Xs.
Heights are defined by Ys (relative to BaseValue and YOffsets).
Orientation of the bars.
Default behavior is vertical so values are on the Y axis and positions are on the X axis.
The position of each bar defines where the left edge of the bar should be.
To center the bar at each position, adjust this value to be negative one-half of the BarWidth.
Size of each bar (along the axis defined by Orientation) relative to ValueBase
Location of the left edge of each bar.
To center bars on these positions, adjust PositionOffset to be negative one-half of the BarWidth.
This array defines the base of each bar.
Unless the user specifically defines it, this will be an array of zeros.
If populated, this array describes the height of errorbars for each bar
If true, errorbars will be drawn according to the values in the YErrors array
Bars are drawn from this level and extend according to the sizes defined in Values[]
Width of bars defined in axis units.
If bars are evenly spaced, consider setting this to a fraction of the distance between the first two Positions.
Width of the errorbar caps defined in axis units.
Thickness of the errorbar lines (pixel units)
Outline each bar with this color.
Set this to transparent to disable outlines.
Color of errorbar lines.
Font settings for labels drawn above the bars
Display circles of user-defined sizes and colors at specific X/Y positions
Clear all bubbles
Add a single bubble
horizontal position (in coordinate space)
horizontal vertical (in coordinate space)
size of the bubble (in pixels)
size of the outline (in pixels)
Add many bubbles with the same size and style
Cleveland Dot plots display a series of paired p[oints.
Positions are defined by Xs.
Heights are defined by Ys1 and Ys2 (internally done with Ys and YOffsets).
Color for the line
Size of the markers at the ends of each line
Text to display in the legend associated with the series 1 data
Color for one of the markers
Marker to use for the series 1 data
Text to display in the legend associated with the series 2 data
Color for one of the markers
Marker to use for the series 2 data
Allows customizing the first point (set by ys1)
The color of the dot, null for no change.
The shape of the dot, null for no change.
The label of the dot in the legend, null for no change
Allows customizing the second point (set by ys2)
The color of the dot, null for no change.
The shape of the dot, null for no change.
The label of the dot in the legend, null for no change
A colorbar translates numeric intensity values to colors.
The Colorbar plot type displays a Colorbar along an edge of the plot.
Width of the colorbar rectangle
If populated, this object holds the plottable containing the heatmap and value data this colorbar represents
Configure ticks that are automatically generated in the absense of manually-added ticks
Minimum number of vertical pixels between tick positions
Optional custom string formatter to translate tick positions to labels
Clear the list of manually-defined ticks.
To enable automatic tick placement call
Add a tick to the list of manually-defined ticks (disabling automatic tick placement)
from 0 (darkest) to 1 (brightest)
string displayed beside the tick
Manually define ticks (disabling automatic tick placement)
from 0 (darkest) to 1 (brightest)
strings displayed beside the ticks
Manually define ticks (disabling automatic tick placement)
from 0 (darkest) to 1 (brightest)
strings displayed beside the ticks
Re-Render the colorbar using a new colormap
Return a Bitmap of just the color portion of the colorbar.
The width is defined by the Width field
The height will be 256
Return a Bitmap of just the color portion of the colorbar
width of the Bitmap
height of the Bitmap
if true, colormap will be vertically oriented (tall and skinny)
Return a list of ticks evenly spaced between the min and max values.
height of the vertical colorbar
minimum pixel distance between adjacent ticks
A Pie chart where the angle of slices is constant but the radii are not.
The data to be plotted
The colors of each slice
The color to draw the axis in
Controls rendering style of the concentric circles (ticks) of the web
If true, each value will be written in text on the plot.
Labels for each category.
Length must be equal to the number of columns (categories) in the original data.
Icons for each category.
Length must be equal to the number of columns (categories) in the original data.
The Crosshair plot type draws a vertical and horizontal line to label a point
on the plot and displays the coordinates of that point in labels that overlap
the axis tick labels.
This plot type is typically used in combination with
MouseMove events to track the location of the mouse and/or with plot types that
have GetPointNearest() methods.
X position (axis units) of the vertical line
X position (axis units) of the horizontal line
Sets style for horizontal and vertical lines
Sets the line width for vertical and horizontal lines
Sets font of the position labels for horizontal and vertical lines
Sets background color of the position labels for horizontal and vertical lines
Sets visibility of the text labels for each line drawn over the axis
Sets color for horizontal and vertical lines and their position label backgrounds
Finance plots display open/high/low/close (OHLC) data
Returns the last element of OHLCs so users can modify FinancePlots in real time.
Display prices as filled candlesticks (otherwise display as OHLC lines)
If True, OHLC timestamps are ignored and candles are placed at consecutive integers and all given a width of 1
Color of the candle if it closes at or above its open value
Color of the candle if it closes below its open value
This field controls the color of the wick and rectangular candle border.
If null, the wick is the same color as the candle and no border is applied.
Create an empty finance plot.
Call Add() and AddRange() to add data.
Create a finance plot from existing OHLC data.
Add a single candle representing a defined time span
Add a single candle to the end of the list assuming each candle is spaced 1 horizontal unit apart
Add a single OHLC to the plot
Add multiple OHLCs to the plot
Clear all OHLCs
Return the simple moving average (SMA) of the OHLC closing prices.
The returned ys are SMA where each point is the average of N points.
The returned xs are times in OATime units.
The returned xs and ys arrays will be the length of the OHLC data minus N.
each returned value represents the average of N points
times and averages of the OHLC closing prices
Return Bollinger bands (mean +/- 2*SD) for the OHLC closing prices.
The returned xs are times in OATime units.
The returned xs and ys arrays will be the length of the OHLC data minus N (points).
each returned value represents the average of N points
times, averages, and both Bollinger bands for the OHLC closing prices
A function plot displays a curve using a function (Y as a function of X)
The function to translate an X to a Y (or null if undefined)
A heatmap displays a 2D array of intensities as small rectangles on the plot
colored according to their intensity value according to a colormap.
Minimum heatmap value
Maximum heatmap value
Number of columns in the heatmap data
Number of rows in the heatmap data
Pre-rendered heatmap image
Horizontal location of the lower-left cell
Vertical location of the lower-left cell
Width of each cell composing the heatmap
Width of each cell composing the heatmap
Position of the left edge of the heatmap
Position of the right edge of the heatmap
Text to appear in the legend
Colormap used to translate heatmap values to colors
If defined, colors will be "clipped" to this value such that lower values (lower colors) will not be shown
If defined, colors will be "clipped" to this value such that greater values (higher colors) will not be shown
Heatmap values below this number (if defined) will be made transparent
Value of the the lower edge of the colormap
Value of the the upper edge of the colormap
Indicates whether values extend beyond the lower edge of the colormap
Indicates whether values extend beyond the upper edge of the colormap
If true, heatmap squares will be smoothed using high quality bicubic interpolation.
If false, heatmap squares will look like sharp rectangles (nearest neighbor interpolation).
Controls which interpolation mode is used when zooming into the heatmap.
This method analyzes the intensities and colormap to create a bitmap
with a single pixel for every intensity value. The bitmap is stored
and displayed (without anti-alias interpolation) when Render() is called.
2D array of data for the heatmap (null values are not shown)
update the Colormap to use this colormap
minimum intensity (according to the colormap)
maximum intensity (according to the colormap)
This method analyzes the intensities and colormap to create a bitmap
with a single pixel for every intensity value. The bitmap is stored
and displayed (without anti-alias interpolation) when Render() is called.
2D array of data for the heatmap (all values are shown)
update the Colormap to use this colormap
minimum intensity (according to the colormap)
maximum intensity (according to the colormap)
Horizontal line at a Y position
Y position to render the line
Render the object this number of pixels right of its coordinate location
Render the object this number of pixels above its coordinate location
Indicates a plottable has data distributed along both axes
and can return the X/Y location of the point nearest a given X/Y location.
Indicates a plottable has data distributed along the horizontal axis
and can return the X/Y location of the point nearest a given X value.
Indicates a plottable has data distributed along the vertical axis
and can return the X/Y location of the point nearest a given Y value.
Indicates a plottable has data distributed along both axes
and can return the X/Y location of the point nearest a given X/Y location.
Display a Bitmap at X/Y coordinates in unit space
Position of the primary corner (based on Alginment)
Position of the primary corner (based on Alginment)
Multiply the size of the image (in pixel units) by this scale factor.
The primary corner (based on Alginment) will remain anchored.
Rotate the image clockwise around its primary corner (defined by Alignment) by this number of degrees
Image to display
Indicates which corner of the Bitmap is described by X and Y.
This corner will be the axis of Rotation, and the center of Scale.
Returns items to show in the legend. Most plottables return a single item. in this array will appear in the legend.
Plottables which never appear in the legend can return null.
Return min and max of the horizontal and vertical data contained in this plottable.
Double.NaN is used for axes not containing data.
Throw InvalidOperationException if ciritical variables are null or have incorrect sizes.
Deep validation is slower but also checks every value for NaN and Infinity.
This interface is for plottable objects that could be styled using the plot's style.
Typically this is for things like frames, tick marks, and text labels.
This class describes a single item that appears in the figure legend.
Lollipop plots display a series of "Lollipops" in place of bars.
Positions are defined by Xs.
Heights are defined by Ys (relative to BaseValue and YOffsets).
Name for this series of values that will appear in the legend
Color of all lollipop components (the stick and the circle)
Size of the circle at the end of each lollipop
Create a lollipop plot from arrays of positions and sizes
position of each lollipop
height of each lollipop
Horizontal position in coordinate space
Vertical position in coordinate space
Marker to draw at this point
Size of the marker in pixel units
Color of the marker to display at this point
Text to appear in the legend (if populated)
A pie plot displays a collection of values as a circle.
Pie plots with a hollow center are donut plots.
A polygon is a collection of X/Y points that are all connected to form a closed shape.
Polygons can be optionally filled with a color or a gradient.
Polygons are multiple Polygon objects.
This plot type is faster alternative for rendering a large number of polygons
compared to adding a bunch of individual Polygon objects to the plot.
Population plots are designed to show collections of data.
A Population is a 1D array of values, and statistics are calculated automatically.
Populations can be displayed as bar plots, box plots, or scatter plots.
Public methods, fields, and properties allow extensive customization.
This plottable supports higher-order grouping (groups of groups).
A radar chart is a graphical method of displaying multivariate data in the form of
a two-dimensional chart of three or more quantitative variables represented on axes
starting from the same point.
Data is managed using 2D arrays where groups (colored shapes) are rows and categories (arms of the web) are columns.
Values for every group (rows) and category (columns) normalized from 0 to 1.
Single value to normalize all values against for all groups/categories.
Individual values (one per category) to use for normalization.
Length must be equal to the number of columns (categories) in the original data.
Labels for each category.
Length must be equal to the number of columns (categories) in the original data.
If showing icons, labels will be ignored.
Icons for each category.
Length must be equal to the number of columns (categories) in the original data.
If showing icons, labels will be ignored.
Labels for each group.
Length must be equal to the number of rows (groups) in the original data.
Colors (typically semi-transparent) to shade the inner area of each group.
Length must be equal to the number of rows (groups) in the original data.
Colors to outline the shape for each group.
Length must be equal to the number of rows (groups) in the original data.
Color of the axis lines and concentric circles representing ticks
Controls if values along each category axis are scaled independently or uniformly across all axes.
Font used for labeling values on the plot
If true, each value will be written in text on the plot.
If true, each category name will be written in text at every corner of the radar
Controls rendering style of the concentric circles (ticks) of the web
Determines the width of each spoke and the axis lines.
Determines the width of the line at the edge of each area polygon.
Replace the data values with new ones.
2D array of groups (rows) of values for each category (columns)
Controls if values along each category axis are scaled independently or uniformly across all axes
If provided, these values will be used to normalize each category (columns)
Normalize a 2D array by dividing all values by the maximum value.
maximum value in the array before normalization
Normalize each row of a 2D array independently by dividing all values by the maximum value.
maximum value in each row of the array before normalization
This class represents a single radial gauge.
It has level and styling options and can be rendered onto an existing bitmap using any radius.
Location of the base of the gauge (degrees)
Current level of this gauge (degrees)
Maximum angular size of the gauge (swept degrees)
Angle where the background starts (degrees)
If true angles end clockwise relative to their base
Used internally to get the angle swept by the gauge background. It's equal to 360 degrees if CircularBackground is set to true. Also, returns a positive value is the gauge is drawn clockwise and a negative one otherwise
If true the background will always be drawn as a complete circle regardless of MaximumSizeAngle
Font used to render values at the tip of the gauge
Size of the font relative to the line thickness
Text to display on top of the label
Location of the label text along the length of the gauge.
Low values place the label near the base and high values place the label at its tip.
Size of the gauge (pixels)
Color of the gauge foreground
Color of the gauge background
Style of the base of the gauge
Style of the tip of the gauge
Defines the location of each gauge relative to the start angle and distance from the center
Indicates whether or not labels will be rendered as text
Render the gauge onto an existing Bitmap
active graphics object
plot dimensions (used to determine pixel scaling)
pixel location on the bitmap to center the gauge on
distance from the center (pixel units) to render the gauge
Return an array indicating the size of each character in a string.
Specifiy the maximum expected size to avoid issues associated with text wrapping.
Reduces an angle into the range [0°-360°].
Angles greater than 360 will roll-over (370º becomes 10º).
Angles less than 0 will roll-under (-10º becomes 350º).
Angle value
Angle whithin [0°-360°]
A radial gauge chart is a graphical method of displaying scalar data in the form of
a chart made of circular gauges so that each scalar is represented by each gauge.
This array holds the original levels passed-in by the user.
These levels are used to calculate radial gauge positions on every render.
Number of gauges.
Maximum size (degrees) for the gauge.
180 is a semicircle and 360 is a full circle.
Controls whether the backgrounds of the gauges are full circles or stop at the maximum angle.
Labels that appear in the legend for each gauge.
Number of labels must equal number of gauges.
May be null if gauges are not to appear in the legend.
Colors for each gauge.
Number of colors must equal number of gauges.
Describes how transparent the unfilled background of each gauge is (0 to 1).
The larger the number the darker the background becomes.
Indicates whether gauges fill clockwise as levels increase.
If false, gauges will fill counter-clockwise (anti-clockwise).
Determines whether the gauges are drawn stacked (dafault value), sequentially, or as a single gauge (ressembling a pie plot).
Controls whether gauges will be dwan inside-out (true) or outside-in (false)
Defines where the gauge label is written on the gage as a fraction of its length.
Low values place the label near the base and high values place the label at its tip.
Angle (degrees) at which the gauges start.
270° for North (default value), 0° for East, 90° for South, 180° for West, etc.
Expected values in the range [0°-360°], otherwise unexpected side-effects might happen.
The empty space between gauges as a fraction of the gauge width.
Size of the gague label text as a fraction of the gauge width.
Describes labels drawn on each gauge.
Controls if value labels are shown inside the gauges.
String formatter to use for converting gauge levels to text
Style of the tip of the gauge
Style of the base of the gauge
Replace gauge levels with new ones.
Calculate the rotational angles for each gauge from the original data values
An L-shaped scalebar rendered in the corner of the data area
Width of the scalebar in cooridinate units
Height of the scalebar in cooridinate units
Distance in pixels from the edge of the data area
The scatter plot renders X/Y pairs as points and/or connected lines.
Scatter plots can be extremely slow for large datasets, so use Signal plots in these situations.
Add this value to each X value before plotting (axis units)
Add this value to each Y value before plotting (axis units)
Replace the Xs array with a new one
Replace the Ys array with a new one
Replace Xs and Ys arrays with new ones
Return the X/Y coordinates of the point nearest the X position
X position in plot space
Return the X/Y coordinates of the point nearest the Y position
Y position in plot space
Return the position and index of the data point nearest the given coordinate
location in coordinate space
location in coordinate space
Ratio of pixels per unit (X/Y) when rendered
A collection of X/Y coordinates that can be displayed as markers and/or connected lines.
Unlike the regular ScatterPlot, this plot type has Add() methods to easily add data.
Clear the list of points
Add a single point to the list
Add multiple points to the list
A signal plot displays evenly-spaced data.
Instead of X/Y pairs, signal plots take Y values and a sample rate.
Optional X and Y offsets can further customize the data.
If enabled, parallel processing will be used to calculate pixel positions for high density datasets.
If fill above and/or below is enabled, this defines the baseline level.
If fill is enabled, a baseline will be drawn using this color.
If fill is enabled, a baseline will be drawn using this width.
If fill is enabled, this color will be used to fill the area below the curve above BaselineY.
If fill is enabled, this color will be used to fill the area above the curve below BaselineY.
When markers are visible on the line (low density mode) this is True
This expression adds two parameters of the generic type used by this signal plot.
Add two Y values (of the generic type used by this signal plot) and return the result as a double
Add two Y values (of the generic type used by this signal plot) and return the result as a the same type
Replace a single Y value
array index to replace
new value
Replace a range of Y values
index to begin replacing
last index to replace
source for new data
source data offset
Replace all Y values from the given index through the end of the array
first index to begin replacing
new values
Replace all Y values with new ones
new Y values
Render when the data is zoomed out so much that it just looks like a vertical line.
Render when the data is zoomed in such that there is more than 1 column per data point.
Rendering is accomplished by drawing a straight line from point to point.
Convert scatter plot points (connected by diagnal lines) to step plot points (connected by right angles)
by inserting an extra point between each of the original data points.
Render the data when there is more than one data point per pixel column.
Each pixel column therefore represents multiple data points.
Rendering is optimized by determining the min/max for each pixel column, then a single line is drawn connecting those values.
Shade the region abvove or below the curve (to infinity) by drawing a polygon to the edge of the visible plot area.
Shade the region abvove and below the curve (to the baseline level) by drawing two polygons
Render similar to high density mode except use multiple colors to represent density distributions.
Return the X/Y coordinates of the point nearest the X position
X position in plot space
Configure the signal plot to only show the curve with no filled area above or below it
Show a solid color beneath the curve
Show a two-color gradient beneath the curve
Show a solid color above the curve
Show a two-color gradient above the curve
Fill the area between the curve and the value
Fill the area between the curve and the edge of the display area using two gradients
Color above the line next to the curve
Color above the line next to the upper edge of the plot area
Color below the line next to the curve
Color below the line next to the lower edge of the plot area
Apply this opacity to all colors
This plot type is a potentially faster version of the SignalPlot.
It pre-calculates min/max values for various segments of data, greatly speeding-up rendering
for extremely large datasets (10s of millions of points).
Note that these pre-calculations require more memory and an up-front calculation delay.
If the underlying data is updated, you must call Update() methods to recalculate the min/max values.
A variation of the SignalPlot optimized for unevenly-spaced ascending X values.
A variation of the SignalPlotConst optimized for unevenly-spaced ascending X values.
A variation of the SignalPlotConst optimized for unevenly-spaced ascending X values.
TODO: document this
Return the X/Y coordinates of the point nearest the X position
X position in plot space
This method to pass test only
X position in plot space
Display a text label at an X/Y position in coordinate space
A tooltip displays a text bubble pointing to a specific location in X/Y space.
The position of the bubble moves according to the axis limits to best display the text in the data area.
Tooltip position in coordinate space
Tooltip position in coordinate space
The VectorField displays arrows representing a 2D array of 2D vectors
Describes which part of the vector line will be placed at the data coordinates.
If enabled arrowheads will be drawn as lines scaled to each vector's magnitude.
When using scaled arrowheads this defines the width of the arrow relative to the vector line's length.
When using scaled arrowheads this defines length of the arrowhead relative to the vector line's length.
Marker drawn at each coordinate
Size of markers to be drawn at each coordinate
Vertical line at an X position
X position to render the line
Represents a series of data values with a common name. Values from several DataSets can be grouped (by value index).
This class holds open/high/low/close (OHLC) price data over a time range.
OHLC price over a specific period of time
opening price
maximum price
minimum price
closing price
open time
width of the OHLC
OHLC price over a specific period of time
opening price
maximum price
minimum price
closing price
open time (DateTime.ToOADate() units)
width of the OHLC in days
Display text in the data area at a pixel location (not a X/Y coordinates)
Display an arrow pointing to a spot in coordinate space
Add a Cleveland Dot plot for the given values. Cleveland Dots will be placed at X positions 0, 1, 2, etc.
Add a Cleveland Dot plot for the given values using defined dot positions.
Add a Lollipop plot for the given values. Lollipops will be placed at X positions 0, 1, 2, etc.
Add a lollipop plot for the given values using defined lollipop positions
Add a bar plot for the given values. Bars will be placed at X positions 0, 1, 2, etc.
Add a bar plot for the given values using defined bar positions
Add a bar plot (values +/- errors) using defined positions
Create a series of bar plots and customize the ticks and legend
Add an empty bubble plot. Call it's Add() method to add bubbles with custom position and styling.
Add a bubble plot with multiple bubbles at the given positions all styled the same.
Call the Add() method to add bubbles manually, allowing further customization of size and style.
Add candlesticks to the chart from OHLC (open, high, low, close) data
Add a colorbar to display a colormap beside the data area
Colormap to display in this colorbar
The size of the right axis will be set to this number of pixels to make room for the colorbar
the colorbar that was just created
Add a colorbar initialized with settings from a heatmap
A heatmap-containing plottable to connect with this colorbar
The size of the right axis will be set to this number of pixels to make room for the colorbar
the colorbar that was just created
Add a crosshair to the plot
position of vertical line (axis units)
position of horizontal line (axis units)
the crosshair that was just created
Create a polygon to fill the area between Y values and a baseline.
Create a polygon to fill the area between two Y curves that share the same X positions.
Create a polygon to fill the area between Y values of two curves.
Create a polygon to fill the area between Y values and a baseline
that uses two different colors for area above and area below the baseline.
Add a line plot that uses a function (rather than X/Y points) to place the curve
Add a heatmap to the plot automatically-sized so each cell is 1x1.
2D array of intensities.
WARNING: Rendering artifacts may appear for arrays larger than Bitmap can support (~10M total values).
If true, AxisScaleLock() will be called to ensure heatmap cells will be square.
Returns the heatmap that was added to the plot.
Act on its public fields and methods to customize it or update its data.
Add a heatmap to the plot automatically-sized so each cell is 1x1.
2D array of intensities.
WARNING: Rendering artifacts may appear for arrays larger than Bitmap can support (~10M total values).
If true, AxisScaleLock() will be called to ensure heatmap cells will be square.
Returns the heatmap that was added to the plot.
Act on its public fields and methods to customize it or update its data.
Add heatmap to the plot stretched to fit the given dimensions.
Unlike the regular heatmap which gives each cell a size of 1x1 and starts at the axis origin,
this heatmap stretches the array so that it covers the defined X and Y spans.
2D array of intensities.
WARNING: Rendering artifacts may appear for arrays larger than Bitmap can support (~10M total values).
position of the left edge of the far left column
position of the left edge of the far right column
position of the upper edge of the bottom row
position of the upper edge of the top row
Returns the heatmap that was added to the plot.
Act on its public fields and methods to customize it or update its data.
Add heatmap to the plot stretched to fit the given dimensions.
Unlike the regular heatmap which gives each cell a size of 1x1 and starts at the axis origin,
this heatmap stretches the array so that it covers the defined X and Y spans.
2D array of intensities.
WARNING: Rendering artifacts may appear for arrays larger than Bitmap can support (~10M total values).
position of the left edge of the far left column
position of the left edge of the far right column
position of the upper edge of the bottom row
position of the upper edge of the top row
Returns the heatmap that was added to the plot.
Act on its public fields and methods to customize it or update its data.
Add a horizontal axis line at a specific Y position
Add a horizontal span (shades the region between two X positions)
Display an image at a specific coordinate
Add a line (a scatter plot with two points) to the plot
Add a line (a scatter plot with two points) to the plot
Add a marker at a specific X/Y position.
This method really creates a scatter plot with a single point.
Add OHLC (open, high, low, close) data to the plot
Add a pie chart to the plot
Add a point (a scatter plot with a single marker)
color of the marker
size of the marker
maker shape
text to appear in the legend
The scatter plot that was created and added to the plot.
Interact with its public fields and methods to customize style and update data.
Add a polygon to the plot
Add many polygons using an optimized rendering method
Add a population to the plot
Add multiple populations to the plot as a single series
Add multiple populations to the plot as a single series
Add a radar plot (a two-dimensional chart of three or more quantitative variables represented on axes starting from the same point)
2D array containing categories (columns) and groups (rows)
if true, axis (category) values are scaled independently
if provided, each category (column) is normalized to these values
also make the plot frameless and disable its grid
the radar plot that was just created and added to the plot
Add a radial gauge plot (a chart where data is represented by concentric circular gauges)
Array of gauge values
Also make the plot frameless and disable its grid
The radial gaugle plot that was just created and added to the plot
A Pie chart where the angle of slices is constant but the radii are not.
The data to plot
Whether to make the plot frameless and disable the grid
Add an L-shaped scalebar to the corner of the plot
Add a scatter plot from X/Y pairs.
Lines and markers are shown by default.
Scatter plots are slower than Signal plots.
Add a scatter plot from X/Y pairs connected by lines (no markers).
Scatter plots are slower than Signal plots.
Add a scatter plot from X/Y pairs using markers at points (no lines).
Scatter plots are slower than Signal plots.
Add a step plot is a type of line plot where points are connected with right angles instead of straight lines.
Scatter plot with Add() and Clear() methods for updating data
Signal plots have evenly-spaced X points and render very fast.
SignalConts plots have evenly-spaced X points and render faster than Signal plots
but data in source arrays cannot be changed after it is loaded.
Methods can be used to update all or portions of the data.
Speed-optimized plot for Ys with unevenly-spaced ascending Xs
Speed-optimized plot for Ys with unevenly-spaced ascending Xs.
Faster than SignalXY but values cannot be modified after loading.
Display text at specific X/Y coordinates
Display text at specific X/Y coordinates
Display a text bubble that points to an X/Y location on the plot
Add a 2D vector field to the plot
Add a vertical axis line at a specific Y position
Add a horizontal span (shades the region between two X positions)
Axis on the bottom edge of the plot
Axis on the top edge of the plot
Axis on the left edge of the plot
Axis on the right edge of the plot
Set the label for the vertical axis to the right of the plot (XAxis)
new text
Set the label for the vertical axis to the right of the plot (YAxis2)
new text
Set the label for the horizontal axis above the plot (XAxis2)
new text
controls font weight
Configure color and visibility of the frame that outlines the data area.
Note that the axis lines of all 4 primary axes touch each other,
giving the appearance of a rectangle framing the data area.
This method allows the user to customize these lines as a group or individually.
visibility of the frames for the 4 primary axes
color for the 4 primary axis lines
visibility of the left axis (YAxis) line
visibility of the right axis (YAxis2) line
visibility of the bottom axis (XAxis) line
visibility of the top axis (XAxis2) line
Give the plot a frameless appearance by hiding all axes.
Axes are hidden by making them invisible and setting their size to zero.
This causes the data area to go right up to the edge of the plot.
Control visibility of axes.
Customize basic options for the primary X and Y axes.
Call XAxis.Grid() and YAxis.Grid() to further customize grid settings.
sets visibility of X and Y grid lines
sets color of of X and Y grid lines
defines the style for X and Y grid lines
Set padding around the data area by defining the minimum size and padding for all axes
YAxis size (in pixels) that defines the area to the left of the plot
YAxis2 size (in pixels) that defines the area to the right of the plot
XAxis size (in pixels) that defines the area to the bottom of the plot
XAxis2 size (in pixels) that defines the area to the top of the plot
Customize the default padding between axes and the edge of the plot
Adjust this axis layout based on the layout of a source plot
plot to use for layout reference
if true, horizontal layout will be matched
if true, vertical layout will be matched
Get the axis limits for the given plot and apply them to this plot
Manually define X axis tick labels using consecutive integer positions (0, 1, 2, etc.)
new tick labels for the X axis
Manually define X axis tick positions and labels
positions on the X axis
new tick labels for the X axis
Manually define Y axis tick labels using consecutive integer positions (0, 1, 2, etc.)
new tick labels for the Y axis
Manually define Y axis tick positions and labels
positions on the Y axis
new tick labels for the Y axis
Set the culture to use for number-to-string converstion for tick labels of all axes.
standard culture
Set the culture to use for number-to-string converstion for tick labels of all axes.
This overload allows you to manually define every format string,
allowing extensive customization of number and date formatting.
Separates the decimal digits
Separates large numbers ito groups of digits for readability
Number of digits after the numberDecimalSeparator
Appearance of negative numbers
Sizes of decimal groups which are separated by the numberGroupSeparator
Create and return an additional axis
Edge of the plot the new axis will belong to
Only plottables with the same axis index will use this axis
defualt label to use for the axis
defualt color to use for the axis
The axis that was just created and added to the plot. You can further customize it by interacting with it.
Remove the a specific axis from the plot
Return the coordinate (in coordinate space) for the given pixel
horizontal pixel location
vertical pixel location
point in coordinate space
Return the X position (in coordinate space) for the given pixel column
horizontal pixel location
horizontal position in coordinate space
Return the Y position (in coordinate space) for the given pixel row
vertical pixel location
vertical position in coordinate space
Return the pixel for the given point in coordinate space
horizontal coordinate
vertical coordinate
pixel location
Return the horizontal pixel location given position in coordinate space
horizontal coordinate
horizontal pixel position
Return the vertical pixel location given position in coordinate space
vertical coordinate
vertical pixel position
Return the limits of the data contained by this plot (regardless of the axis limits).
WARNING: This method iterates all data points in the plot and may be slow for large datasets.
Returns the current limits for a given pair of axes.
which axis index to reference
which axis index to reference
current limits
Set limits for the a given pair of axes
lower limit of the horizontal axis
upper limit of the horizontal axis
lower limit of the vertical axis
upper limit of the vertical axis
index of the axis the horizontal limits apply to
index of the axis the vertical limits apply to
Set limits for the primary X axis
lower limit of the horizontal axis
upper limit of the horizontal axis
Set limits for the primary Y axis
lower limit of the vertical axis
upper limit of the vertical axis
Set limits for a pair of axes
new limits
index of the axis the horizontal limits apply to
index of the axis the vertical limits apply to
Set maximum outer limits beyond which the plot cannot be zoomed-out or panned.
Set maximum outer limits beyond which the plot cannot be zoomed-out or panned.
Set minimum innter limits which will always be visible on the plot.
Auto-scale the axis limits to fit the data. This function is an alias for AxisAuto().
horizontal margin in the range [0, 1]
vertical margin in the range [0, 1]
Current default margins for automatic axis scaling
Auto-scale the axis limits to fit the data. This function is an alias for AxisAuto().
This overload is for multi-axis plots (plots with multiple X and Y axes) and will only adjust the specified axes.
horizontal margin in the range [0, 1]
vertical margin in the range [0, 1]
Only adjust the specified axis (for plots with multiple X axes)
Only adjust the specified axis (for plots with multiple Y axes)
Current default margins for automatic axis scaling
Automatically set axis limits to fit the data.
Extra space (fraction) to add to the left and right of the limits of the data (typically 0.05)
Extra space (fraction) to add above and below the limits of the data (typically 0.1)
Automatically set axis limits to fit the data.
This overload is designed for multi-axis plots (with multiple X axes or multiple Y axes).
Extra space (fraction) to add to the left and right of the limits of the data (typically 0.05)
Extra space (fraction) to add above and below the limits of the data (typically 0.1)
Only adjust the specified axis (for plots with multiple X axes)
Only adjust the specified axis (for plots with multiple Y axes)
Automatically adjust axis limits to fit the data
amount of space to the left and right of the data (typically 0.05)
Only adjust the specified axis (for plots with multiple X axes)
Automatically adjust axis limits to fit the data (with a little extra margin)
amount of space above and below the data (as a fraction of its height)
Only adjust the specified axis (for plots with multiple Y axes)
Adjust axis limits to achieve a certain pixel scale (units per pixel)
zoom so 1 pixel equals this many horizontal units in coordinate space
zoom so 1 pixel equals this many vertical units in coordinate space
Lock X and Y axis scales (units per pixel) together to protect symmetry of circles and squares
if true, scales are locked such that zooming one zooms the other
defines behavior for how to adjust axis limits to achieve equal scales
Zoom in or out. The amount of zoom is defined as a fraction of the current axis span.
horizontal zoom (>1 means zoom in)
vertical zoom (>1 means zoom in)
if defined, zoom will be centered at this point
if defined, zoom will be centered at this point
index of the axis to zoom
index of the axis to zoom
Pan the primary X and Y axis without affecting zoom
horizontal distance to pan (in coordinate units)
vertical distance to pan (in coordinate units)
The settings object stores all state (configuration and data) for a plot
Plot image width (pixels)
Plot image height (pixels)
A ScottPlot stores data in plottable objects and draws it on a bitmap when Render() is called
default width (pixels) to use when rendering
default height (pixels) to use when rendering
Brief description of this plot
plot description
ScottPlot version in the format "1.2.3" (or "1.2.3-beta" for pre-releases)
Add a plottable to the plot
a plottable the user created
Clear all plottables
Remove all plottables of the given type
all plottables of this type will be removed
Remove a specific plottable
The plottable to remove
Remove the plottable at the specified index of the list
The zero-based index of the element to remove
Move a plottable in the list. Plottables near the end are rendered last (on top).
Move a plottable to the front so it is rendered first and appears beneath all others.
Move a plottable to the end so it is rendered last and appears above all others.
Return a copy of the list of plottables
list of plottables
Throw an exception if any plottable contains an invalid state.
Check every individual value for validity. This is more thorough, but slower.
The Settings module stores manages plot state and advanced configuration.
Its class structure changes frequently, and users are highly advised not to interact with it directly.
This method returns the settings module for advanced users and developers to interact with.
Show a warning message indicating this method is only intended for developers
Settings used by the plot
Update the default size for new renders
width (pixels) for future renders
height (pixels) for future renders
Return a new color from the Pallette based on the number of plottables already in the plot.
Use this to ensure every plottable gets a unique color.
value from 0 (transparent) to 1 (opaque)
new color
The palette defines default colors to use for new plottables.
Set the colors and fonts of many plot components at once using a predefined theme
Set the color of specific plot components
Color for area beneath the axis ticks and labels and around the data area
Color for area inside the data frame but beneath the grid and plottables
Color for grid lines
Color for axis tick marks and frame lines
Color for axis labels and tick labels
Color for the top axis label (XAxis2's title)
If enabled, the benchmark displays render information in the corner of the plot.
True/false defines whether benchmark is enabled. Null will not change the benchmark.
true if the benchmark is enabled
Return an array of times for the last several renders.
The last element of the array is the most recently rendered frame time.
Configure legend visibility and location.
Optionally you can further customize the legend by interacting with the object it returns.
whether or not the legend is visible
position of the legend relative to the data area
The legend itself. Use public fields to further customize its appearance and behavior.
Return a new Plot with all the same Plottables (and some of the styles) of this one.
A new plot similar to this one.
The GUID helps identify individual plots
Every plot has a globally unique ID (GUID) that can help differentiate it from other plots
A string representing the GUID
Returns true if the given plot is the exact same plot as this one
the plot to compare this one to
true if the two plots have the same GUID
Returns an integer unique to this instance (based on the GUID)
An integer representing the GUID
Create a series of bar plots given a 2D dataset
Render the plot onto an existing bitmap
an existing bitmap to render onto
scale the size of the output image by this fraction (without resizing the plot)
the same bitmap that was passed in (but was rendered onto)
Wait for the current render to finish, then prevent future renders until RenderUnlock() is called.
Locking rendering is required if you intend to modify plottables while rendering is occurring in another thread.
Release the render lock, allowing renders to proceed.
Render the plot onto a new Bitmap (using the size given when the plot was created or resized)
if true, anti-aliasing will be disabled for this render
the Bitmap that was created
Render the plot onto a new Bitmap of the given dimensions
resize the plot to this width (pixels) before rendering
resize the plot to this height (pixels) before rendering
if true, anti-aliasing will be disabled for this render
scale the size of the output image by this fraction (without resizing the plot)
the Bitmap that was created
Create a new Bitmap, render the plot onto it, and return it
Render the plot and return the bytes for a PNG file.
This method is useful for rendering in stateless cloud environments that do not use a traditional filesystem.
Return a new Bitmap containing only the legend
new bitmap containing the legend
Save the plot as an image
file path for the images (existing files will be overwritten)
resize the plot to this width (pixels) before rendering
resize the plot to this height (pixels) before rendering
if true, anti-aliasing will be disabled for this render. Default false
scale the size of the output image by this fraction (without resizing the plot)
Full path for the image that was saved
Describes which part of the vector line will be placed at the data coordinates.
If enabled arrowheads will be drawn as lines scaled to each vector's magnitude.
When using scaled arrowheads this defines the width of the arrow relative to the vector line's length.
When using scaled arrowheads this defines length of the arrowhead relative to the vector line's length.
Size of the arrowhead if custom/scaled arrowheads are not in use
Size of the arrowhead if custom/scaled arrowheads are not in use
Marker drawn at each coordinate
Size of markers to be drawn at each coordinate
Render an evenly-spaced 2D vector field.
An Axis stores dimensions (axis limits and pixel/unit conversion methods) and can render
itself including axis label, tick marks, tick labels, and grid lines
Axis dimensions and methods for pixel/unit conversions
Plottables with this axis index will use pixel/unit conversions from this axis
Return configuration objects to allow deep customization of axis settings.
WARNING: This API may not be stable across future versions.
Define the minimum and maximum limits for the pixel size of this axis
Size this axis to an exact number of pixels
Define how many pixels away from the data area this axis will be.
TightenLayout() populates this value (based on other PixelSize values) to stack axes beside each other.
Returns the number of pixels occupied by this axis
Use the latest configuration (size, font settings, axis limits) to determine tick mark positions
Render all components of this axis onto the given Bitmap
DateTime format assumes axis represents DateTime.ToOATime() units and displays tick labels accordingly.
Configure the label of this axis
Display a custom image as the axis label instead of text
The image to display where the label should go
pixels of padding between the inner image edge and the data area
pixels of padding between the outer image edge and the figure edge
Set color of every component of this axis (label, line, tick marks, and tick labels)
Use a custom function to generate tick label strings
Manually define the string format to use for translating tick positions to tick labels
Customize string settings for the tick labels
Define a manual spacing between major ticks (and major grid lines)
Define a manual spacing between major ticks (and major grid lines) for axes configured to display using DateTime format
Manually define major tick (and grid) positions and labels
Ruler mode draws long tick marks and offsets tick labels for a ruler appearance
Enable this to snap major ticks (and grid lines) to the nearest pixel to avoid anti-aliasing artifacts
Apply the same color to major and minor tick marks
Set colors for major and minor tick marks
Control whether tick marks point outward or inward
Set the culture to use for unit-to-string tick mark conversion
Manually define culture to use for unit-to-string tick mark conversion
Customize styling of the tick labels
Customize styling of the label (without changing its content)
Set visibility of all ticks
Set visibility of individual tick components
This value defines the packing density of tick labels.
A density of 1.0 means labels fit tightly based on measured maximum label size.
Higher densities place more ticks but tick labels may oberlap.
Define the smallest distance between major ticks, grid lines, and tick labels in coordinate units.
This only works for numeric tick systems (DateTime ticks are not supported).
Sets whether minor ticks are evenly spaced or log-distributed between major tick positions
Configure the line drawn along the edge of the axis
Set the minimum size and padding of the axis
Configure visibility and styling of the major grid
Configure visibility and styling of the minor grid
Hide this axis by forcing its size to always be zero.
Set visibility for major tick grid lines
Set pixel size based on the latest axis label, tick marks, and tick label
Lock min/max limits so it cannot be changed (until it's unlocked)
Return the ticks displayed in the previous render
This class stores MUTABLE axis limits and pixel size information for a SINGLE AXIS.
Unlike PlotDimensions(immutable objects created just before rendering),
values in this class are intended for long term storage.
Size of the entire figure (in pixels) if it were to be exported as an image
Side of just the data area (in pixels).
The data area is the inner rectangle that displays plots.
Offset of the data area (in pixels) relative to the left or top edge of the figure.
Indicates whether pixel values ascend in the same direciton as axis unit values.
Horizontal axes are not inverted (both ascend from left to right).
Vertical axes are inverted (units ascend from bottom to top but pixel positions ascend from top to bottom).
Lower edge of the data area (axis units).
Upper edge of the data area (axis units).
Limit beyond which the plot cannot be zoomed in
Limit beyond which the plot cannot be zoomed in
Limit which will always be visible on the data area
Limit which will always be visible on the data area
Size of the view boundaries.
This should always be greater or equal to the Span.
False until axes are intentionally set.
Unset axes default to NaN min/max limits.
True if min or max is NaN.
Size of the data area (axis units)
Center of the data area (axis units)
Number of pixels for each axis unit
Size of 1 screen pixel in axis units
Limit remember/recall is used while mouse dragging
Limit remember/recall is used while mouse dragging
If true, min/max cannot bet set.
Limit remember/recall is used while mouse dragging
Limit remember/recall is used while mouse dragging
Return limits that contain no NaNs.
NaNs will be replaced with +/- 10.
Reset the axis as if it were never set.
Resize/reposition this axis according to the given pixel units
Set data size and offset based on desired padding between the edge of the figure and data area
Set boundaries beyond which this axis cannot be panned or zoomed
Set boundaries beyond which this axis cannot be panned or zoomed
Modify axis limits such that none extend beyond the boundaries.
Set axis limits
Shift min and max by the given number of units
Shift min and max by the given number of pixels
Zoom by simultaneously adjusting Min and Max
1 for no change, 2 zooms in, .5 zooms out.
If given, zoom toward/from this alternative center point.
Get the pixel location on the figure for a given position in axis units
Get the axis unit position for the given pixel location on the figure
Sets a flag indicating whether axis limits are mutable.
Controls whether this axis occupies space and is displayed
Edge of the data area this axis represents
Axis title
Font options for the axis title
Set this field to display a bitmap instead of a text axis label
Padding (in pixels) between the image and the edge of the data area
Padding (in pixels) between the image and the edge of the figure
Total amount (in pixels) to pad the image when measuring axis size
Amount of padding (in pixels) to surround the contents of this axis
Distance to offset this axis to account for multiple axes
Exact size (in pixels) of the contents of this this axis
Return the size of the contents of this axis.
Returned dimensions are screen-accurate (even if this axis is rotated).
Return the point and rotation representing the center of the base of this axis
A "renderable" is any object which can be drawn on the figure.
Returns an array of render times (in milliseconds) of the last several renders.
The most recent renders are at the end of the array.
This module holds state for figure dimensions, axis limits, plot contents, and styling options.
A plot can be duplicated by copying the full state of this settings module.
This List contains all plottables managed by this Plot.
Render order is from lowest (first) to highest (last).
Unique value that changes any time the list of plottables is modified.
Return the next color from PlottablePalette based on the current number of plottables
List of all axes used in this plot.
Axes can be added, but existing ones should not be removed.
Get an array containing just horizontal axes
Get an array containing just vertical axes
Return the first horizontal axis with the given axis index
Return the first vertical axis with the given axis index
Indicates whether unset axes are present.
If true, the user may want to call AxisAuto() or SetAxisLimits().
Controls relationship between X and Y axis scales.
See documentation for enumeration members.
Primary vertical axis (on the left of the plot)
Secondary vertical axis (on the right of the plot)
Primary horizontal axis (on the bottom of the plot)
Secondary horizontal axis (on the top of the plot)
Width of the figure (in pixels)
Height of the figure (in pixels)
Default padding to use when AxisAuto() or Margins() is called without a specified margin
Default padding to use when AxisAuto() or Margins() is called without a specified margin
Return figure dimensions for the specified X and Y axes
Set the default size for rendering images
Reset axis limits to their defauts
Define axis limits for a particuar axis
Define axis limits for a particuar axis
Return X and Y axis limits
Pan all axes by the given pixel distance
Zoom all axes by the given pixel distance
Zoom all axes by the given fraction
Automatically adjust X and Y axis limits of all axes to fit the data
Automatically adjust axis limits for all axes which have not yet been set
If a scale lock mode is in use, modify the axis limits accordingly
Automatically adjust X axis limits to fit the data
Automatically adjust Y axis limits to fit the data
Store axis limits (useful for storing state upon a MouseDown event)
Recall axis limits (useful for recalling state from a previous MouseDown event)
Remember mouse position (do this before calling MousePan or MouseZoom)
Pan all axes based on the mouse position now vs that last given to MouseDown()
Zoom all axes based on the mouse position now vs that last given to MouseDown()
Ensure all axes have the same size and offset as the primary X and Y axis
Automatically adjust the layout for every axis
The ticks for each spoke.
The number of spokes to draw.
Labels for each category.
Length must be equal to the number of columns (categories) in the original data.
Icons for each category.
Length must be equal to the number of columns (categories) in the original data.
Controls rendering style of the concentric circles (ticks) of the web
Indicates the type of axis chart to render
Color of the axis lines and concentric circles representing ticks
If true, each value will be written in text on the plot.
If true, category labels will be written in text on the plot (provided they exist)
Determines whether each spoke should be labeled, or just the first
The drawing surface to use.
Font used for labeling values on the plot
Determines the width of each spoke and the axis lines.
Return the minimum, and maximum, and sum of a given array.
Return the standard deviation of the given values.
Return the standard deviation of the given values.
This overload is faster because the mean of the values is provided.
Return the standard error of the given values
Return the mean of the given values
Return the Nth smallest value in the given array.
Return the value of the Nth quantile.
Return the value of the Nth quartile
quartile 1, 2, or 3
Return the percentile of the given array
number from 0 to 100
Return the percentile of the given array
number from 0 to 100
Return the median of the given array.
If the length of the array is even, this value is the mean of the upper and lower medians.
Return the kth smallest value from a range of the given array.
WARNING: values will be mutated.
inclusive lower bound
inclusive upper bound
number starting at 0
Return a random integer from within the given range
inclusive lower bound
exclusive upper bound
Partition the array between the defined bounds according to elements above and below a randomly chosen pivot value
index of the pivot used
Given a dataset of values return the probability density function.
The returned function is a Gaussian curve from 0 to 1 (not normalized)
original dataset
Function to return Y for a given X
Given a dataset of values return the probability density function at specific X positions.
Returned values will be normalized such that their integral is 1.
original dataset
Positions (Xs) for which probabilities (Ys) will be returned
if True, output will be multiplied by 100
Densities (Ys) for each of the given Xs
Return the cumulative sum of the given data
Compute the histogram of a dataset.
Input data
Lower edge of the first bin (inclusive). If NaN, minimum of input values will be used.
High edge of the largest bin (inclusive). If NaN, maximum of input values will be used.
Width of each bin.
If False, the result will contain the number of samples in each bin. If True, the result is the value of the probability density function at the bin (the sum of all values will be 1 if the bin size is 1).
Compute the histogram of a dataset.
Input data
Number of equal-width bins
If False, the result will contain the number of samples in each bin. If True, the result is the value of the probability density function at the bin (the sum of all values will be 1 if the bin size is 1).
Lower edge of the first bin (inclusive). If NaN, minimum of input values will be used.
High edge of the largest bin (inclusive). If NaN, maximum of input values will be used.
Simple moving average
number of values to use for each calculation
number of values to use for each calculation
only return data where values are present for the whole period
Simple moving standard deviation
number of values to use for each calculation
Return the simple moving average (SMA) of the OHLC closing prices.
The returned data will be shorter than the input data by N points.
price data to analyze
each returned price represents the average of N prices
Return the SMA and upper/lower Bollinger bands for the given price data.
The returned data will NOT be shorter than the input data. It will contain NaN values at the front.
price data to use for analysis
each returned price represents the average of N prices
number of standard deviations from the mean to use for the Bollinger bands
Return the SMA and upper/lower Bollinger bands for the closing price of the given OHLCs.
The returned data will be shorter than the input data by N values.
price data to use for analysis
each returned price represents the average of N prices
number of standard deviations from the mean to use for the Bollinger bands
Lower edges of bins used to create the histogram
Total number of values in each bin.
Fractional number of values in each bin.
The total of all values in this array is 1.0.
Cumulative total number of values in each bin.
The returned array will start near 0.0 and end near 1.0.
Probability density (fraction) for each bin based on the mean and standard deviation of the population.
The sum of all these values is 1.0
This is the probability density curve normalized to its peak, so its maximum value is 1.0
Cumulative probability density fraction for each bin
Distance between each bin
Population mean
Population standard deviation
Compute the histogram of a set of data.
Bins are identically sized and evenly spaced.
input data
manually-defined lower edge of first bin
manually-defined upper edge of last bin
manually-defined width of each bin
resize bins as needed so this number of bins is achieved
if True, values below min or above max will be ignored
The End Slope Spline is a Natural Spline whose first and last point slopes can be defined
Natural Spline data interpolator
The Periodic Spline is a Natural Spline whose first and last point slopes are equal
This module holds an array of values and provides popultation statistics (mean, median, standard deviation, etc)
Generate random values with a normal distribution
Calculate population stats from the given array of values
A population series is a collection of similar PopulationStats objects.
Return an array containing every available style
A theme describes a collection of colors and fonts that can be used to style a plot
Label to show in the corner when using multiplier or offset notation
Measured size of the largest tick label
Measured size of the largest tick label
Controls how to translate positions to strings
If True, these ticks are placed along a vertical (Y) axis.
This is used to determine whether tick density should be based on tick label width or height.
If True, the sign of numeric tick labels will be inverted.
This is used to give the appearance of descending ticks.
Define how minor ticks are distributed (evenly vs. log scale)
If defined, this function will be used to generate tick labels from positions
Optimally packed tick labels have a density 1.0 and lower densities space ticks farther apart.
Defines the minimum distance (in coordinate units) for major ticks.
If True, non-integer tick positions will not be used.
This may be desired for log10-scaled axes so tick marks are even powers of 10.
Return an array of log-spaced minor tick marks for the given range
Locations of visible major ticks. Must be evenly spaced.
Do not include minor ticks less than this value.
Do not include minor ticks greater than this value.
Number of minor ranges to divide each major range into. (A range is the space between tick marks)
Array of minor tick positions (empty at positions occupied by major ticks)
return a copy of the given array padded with the given value at both sidees
Throw an exception if the value is NaN or infinity
Throw an exception if the array is null or contains NaN or infinity
Throw an exception if the array is null or contains NaN or infinity
Throw an exception if one elemnt is equal to or less than the previous element
Throw an exception if one elemnt is equal to or less than the previous element
Throw an exception if the array does not contain at least one element
Throw an exception if the array does not contain at least one element
Throw an exception if the array does not contain at least one element
Throw an exception if the array does not contain at least one element
Throw an exception if non-null arrays have different lengths
Throw an exception if non-null arrays have different lengths
Returns true if all non-null arguments have equal length
Throws an exception if the string is null, empty, or only contains whitespace