ScottPlot
Pad the data area with the given fractions of whitespace.
A value of 0.1 means 10% padding (5% on each side of the data area).
Pad each side of the data area with the exact fraction of whitespace.
0.05 means 5% whitespace on that side of the data area.
Fractional amount to expand the axis vertically if data runs outside the current view
Show the entire range of data, changing the axis limits only
when the data extends outside the current view.
Defines the amount of whitespace added to the right of the data when data runs outside the current view.
1.0 for a view that tightly fits the data and is always changing.
2.0 for a view that doubles the horizontal span when new data runs outside the current view.
Slide the view to the right to keep the newest data points in view
Amount of horizontal area to display (in axis units)
Defines the amount of whitespace added to the right of the data when data runs outside the current view.
0 for a view that slides every time new data is added
1 for a view that only slides forward when new data runs off the screen
Defines the amount of whitespace added to the top or bottom of the data when data runs outside the current view.
0 sets axis limits to tightly fit the data height
1 sets axis limits to double the vertical span in the direction of the vertical overflow
Logic that determines padding around the data area when is called
Horizontal axes
Vertical axes
Panels take up space on one side of the data area (like a colorbar)
A special panel
All axes
All axes with the given edge
Returns all axes, panels, and the title
The primary horizontal axis above the plot
The primary horizontal axis below the plot
The primary vertical axis to the left of the plot
The primary vertical axis to the right of the plot
Indicates whether the axis limits have been set (manually or by autoscale)
The standard grid that is added when a Plot is created.
Users can achieve custom grid functionality by disabling the visibility
of this grid and adding their own classes to the List of .
List of custom grids.
If in use, it is likely the default grid visibility should be disabled.
Return the and all
Rules that are applied before each render
Rules for updating axes of other plots when this plot's axis limits change
If enabled, AutoScale() will be called at the start of each render.
This can negatively impact performance of plots with an extremely large number of data points.
When is true,
this action is called before each frame is rendered.
Users can assign their own static function to customize continuous autoscaling behavior.
Contains state and logic for axes
Apply a single color to the label, tick labels, tick marks, and frame of all axes
Apply a single color to the label, tick labels, tick marks, and frame of the specified axis
Set visibility of the frame on every axis
Set thickness of the frame on every axis
Set color of the frame on every axis
Remove all axes that lie on the given edge.
Remove the given axis from the plot
Remove the given Panel
Remove all bottom axes, create a DateTime bottom axis, add it to the plot, and return it.
Remove all bottom axes, create a numeric bottom axis, add it to the plot, and return it.
Crete a new axis, add it to the plot, and return it
Crete a new axis, add it to the plot, and return it
Crete a new axis, add it to the plot, and return it
Crete a new axis, add it to the plot, and return it
Adjust the horizontal axis so values descend from left to right
Adjust the horizontal axis so values ascend from left to right
Adjust the vertical axis so values descend from bottom to top
Adjust the vertical axis so values ascend from bottom to top
Return the 2D axis limits for the default axes
Return the 2D axis limits for the given X/Y axis pair
Return the 2D axis limits for the given X/Y axis pair
Return the 2D axis limits of data for all plottables using the default axes
Return the 2D axis limits of data for all plottables using the given axes
Adds the default X and Y axes to all plottables with unset axes
Automatically scale all axes to fit the data in all plottables
Autoscale the given axes to accommodate the data from all plottables that use them
Automatically expand the default axes to fit the data in all plottables.
Automatically expand the provided axes to fit the data in all plottables.
Automatically expand the provided axes horizontally to fit the data in all plottables.
Automatically expand the default horizontal axis to fit the data in all plottables.
Automatically expand the provided axes vertically to fit the data in all plottables.
Automatically expand the default vertical axis to fit the data in all plottables.
Autoscale the bottom horizontal axis limits to fit the data of all plotted objects
Autoscale the left vertical axis limits to fit the data of all plotted objects
Autoscale the supplied horizontal axis limits to fit the data of all plotted objects
Autoscale the supplied vertical axis limits to fit the data of all plotted objects
Autoscale the default (left and bottom) axis limits to fit the data of the supplied plottables
Autoscale the default bottom horizontal axis limits to fit the data of the supplied plottables
Autoscale the default left vertical axis limits to fit the data of the supplied plottables
Adjust limits all axes to pan the pixel distance between two points
Adjust limits all axes to pan given pixel distance
Adjust limits all axes to pan by the given distance in coordinate space
Modify zoom for all axes as if the mouse were right-clicked and dragged
Zoom out so the new view is the given fraction of the original view
Zoom out so the new view is the given fraction of the original view
Zoom out so the new view is the given fraction of the original view
Reset plot data margins to their default value.
Define the amount of whitespace to place around the data area when calling .
Values are a fraction from 0 (tightly fit the data) to 1 (lots of whitespace).
Define the amount of whitespace to place on the left and right of the data area when calling .
Values are a fraction from 0 (tightly fit the data) to 1 (lots of whitespace).
Define the amount of whitespace to place on the bottom and top of the data area when calling .
Values are a fraction from 0 (tightly fit the data) to 1 (lots of whitespace).
Auto-scale to tightly fit the data so there is no spacing between data points and the edge of the data area
Define the amount of whitespace to place around the data area when calling .
Values are a fraction from 0 (tightly fit the data) to 1 (lots of whitespace).
Force pixels to have a 1:1 scale ratio.
This allows circles to always appear as circles and not stretched ellipses.
If true, force pixels to have a 1:1 scale ratio.
This allows circles to always appear as circles and not stretched ellipses.
If false, disable axis rules related to square units and restore default behavior.
Disable visibility of all axes and titles so the data area fills the entire figure
Set anti-aliasing for axis frames, tick marks, and grid lines
Hairline mode causes lines to always render exactly 1 pixel wide regardless of .
This function controls hairline behavior for all axis frames. tick marks, and grid lines.
Add a link to another plot's axis so its limits update when limits of an axis from this plot changes
Add a link to the target plot control so its axis limits update when this plot's axis limits change
Add a link to the target plot so its axis limits update when this plot's axis limits change
Remove all linked axes rules
Remove all linked axes rules involving the target plot control
Remove all linked axes rules involving the target plot
Remove all linked axes rules involving the given axis
This is called in the render system after AxisLimitsChanged has been invoked
Controls whether labels should be clipped to the boundaries of the data area
Apply a single color to all axis components: label, tick labels, tick marks, and frame
Draw a line along the edge of an axis on the side of the data area
Replace the with a pre-loaded with the given ticks.
A simple custom Y axis which includes a subtitle/sub-label.
Note that and are called whenever the plot needs to be rendered
so be wary of heavy code that will slow down the rendering if you are using the chart in a user interface
where there is zooming, panning, etc.
for various types provided by ScottPlot
Thread-Safe singleton
The circular buffer starts with an empty list and grows to a maximum size.
When the buffer is full, adding or inserting a new item removes the first item in the buffer.
A custom colormap created from a collection of colors
A custom colormap created from a collection of colors
A custom palette which smoothly blends across a collection of colors using linear interpolation
A palette of colors with "hard edges" (no interpolation between colors)
A rainbow colormap inspired by Jet and Turbo but adapted by Scott Harden to have
less dark edges (red or purple) and a more mellow center (darker yellow/green)
for more even brightness perception when displayed using thin lines on a white background.
Helper class used when a source (such as ) does not implement
Helper class used when a source (such as ) does not implement
Return the vertical range covered by data between the given indices (inclusive)
Get the index associated with the given X position
Get the index associated with the given X position limited to the given range
Given a pixel column, return the pixels to render its line.
If the column contains no data, no pixels are returned.
If the column contains one point, return that one pixel.
If the column contains multiple points, return 4 pixels: enter, min, max, and exit
Given a pixel column, return the pixels to render its line.
If the column contains no data, no pixels are returned.
If the column contains one point, return that one pixel.
If the column contains multiple points, return 4 pixels: enter, min, max, and exit
If data is off to the screen to the left,
returns information about the closest point off the screen
If data is off to the screen to the bottom,
returns information about the closest point off the screen
If data is off to the screen to the right,
returns information about the closest point off the screen
If data is off to the screen to the top,
returns information about the closest point off the screen
Search the index associated with the given X position
Search the index associated with the given X position limited to the given range
Fixed-length array used as a circular buffer to shift data in at the position defined by .
Values in this array should not be modified externally if is enabled.
Index in where the next point will be added
Index in holding the newest data point
Value of the most recently added data point
The number of visible data points to display
The total number of data points added
Total of data points added the last time this plottable was rendered.
This can be compared with to determine if a new render is required.
Minimum value of all known data (not just the data in view)
Maximum value of all known data (not just the data in view)
Shift in a new Y value
Shift in a collection of new Y values
Clear the buffer by setting all Y points to the given value
This data source manages X/Y points as a collection of coordinates
This data source manages X/Y points as a collection of coordinates
This data source manages X/Y points as a collection of coordinates
This data source manages X/Y points as a collection of coordinates
This data source manages X/Y points as separate X and Y collections
This data source manages X/Y points as separate X and Y collections
This data source manages X/Y points as separate X and Y collections
This data source manages X/Y points as separate X and Y collections
This data source manages X/Y points as separate X and Y collections
This data source manages X/Y points as separate X and Y collections
If the point to the left of the graph is extremely far outside the data area,
modify it using interpolation so it's closer to the data area to prevent render artifacts.
If the point to the bottom of the graph is extremely far outside the data area,
modify it using interpolation so it's closer to the data area to prevent render artifacts.
If the point to the right of the graph is extremely far outside the data area,
modify it using interpolation so it's closer to the data area to prevent render artifacts.
If the point to the top of the graph is extremely far outside the data area,
modify it using interpolation so it's closer to the data area to prevent render artifacts.
Return the vertical range covered by data between the given indices (inclusive)
Get the index associated with the given X position
Get the index associated with the given X position limited to the given range
Given a pixel column, return the pixels to render its line.
If the column contains no data, no pixels are returned.
If the column contains one point, return that one pixel.
If the column contains multiple points, return 4 pixels: enter, min, max, and exit
Given a pixel column, return the pixels to render its line.
If the column contains no data, no pixels are returned.
If the column contains one point, return that one pixel.
If the column contains multiple points, return 4 pixels: enter, min, max, and exit
If data is off to the screen to the left,
returns information about the closest point off the screen
If data is off to the screen to the bottom,
returns information about the closest point off the screen
If data is off to the screen to the right,
returns information about the closest point off the screen
If data is off to the screen to the top,
returns information about the closest point off the screen
Search the index associated with the given X position
Search the index associated with the given X position limited to the given range
Return the vertical range covered by data between the given indices (inclusive)
Get the index associated with the given X position
Get the index associated with the given X position limited to the given range
Given a pixel column, return the pixels to render its line.
If the column contains no data, no pixels are returned.
If the column contains one point, return that one pixel.
If the column contains multiple points, return 4 pixels: enter, min, max, and exit
Given a pixel column, return the pixels to render its line.
If the column contains no data, no pixels are returned.
If the column contains one point, return that one pixel.
If the column contains multiple points, return 4 pixels: enter, min, max, and exit
If data is off to the screen to the left,
returns information about the closest point off the screen
If data is off to the screen to the bottom,
returns information about the closest point off the screen
If data is off to the screen to the right,
returns information about the closest point off the screen
If data is off to the screen to the top,
returns information about the closest point off the screen
Search the index associated with the given X position
Search the index associated with the given X position limited to the given range
Check if a collection is in ascending order
the type to evaluate
The values
The comparer to use. If not specified, uses Comparer{T}.Default (which is preferred)
True if the collection is ascending (and can therefore be used with BinarySearch and GetClosest). Otherwise false.
Gets the closest index to a specified from the
The type of values in the collection
Must be an object that implements IList or IReadOnlyList. List{T} | T[] are preferred.
The collection to search. Collection must be in ascending order.
The value to search for in the collection
Provides details about the range of indexes to search
A comparer used to determine equality - recommend default comparer or
The index of the item that is closest to the
Calculates the maximum count of indexes available to render in an 's collection
The datasource
The number of indexes that should be rendered
Example :
MaxIndex = Xs.Length - 1
MinIndex = 0,
returns Xs.Length
Creates a new
The DataSource
an IndexRange representing a the minimum and maximum indexes to render
Scale the by applying the and the
the value to scale
the scaling factor to apply.
the offset to apply
value * +
The type of value - will be converted to a double via
Scale a value from the collection by the and
the collection to select a value from
the index of the value within the collection
Scale a coordinate by applying the offsets and the scaling factors.
Unscale a coordinate
the coordinate to unscale
RenderDetails used to unscale the coordinate by the pixels/axis
The plottable's X Scaling factor
The plottable's X Offset
The plottable's Y Scaling factor
The plottable's Y OFfset
The X-Axis to used to get the pixel scaling from the . If not found uses the default value from the renderInfo.
The Y-Axis to used to get the pixel scaling from the . If not found uses the default value from the renderInfo.
A new value
Checks and decides to call the Fast or Original method accordingly
Checks and decides to call the Fast or Original method accordingly
Get the nearest datapoint on the plot from the , based on the and the
This is the original way to locate the nearest DataPoint from the collection, and is safe for unsorted collections (such as Scatter)
The data source
the mouse coordinates from the plot.
The maximum distance to search
The X-Axis of assigned to the datasource. If not specified, uses the bottom axis.
The X-Axis of assigned to the datasource. If not specified, uses the left axis.
If match found : returns a datapoint that represents the closest (X,Y) coordinate on the plot, and the index that can be used to get the values from the DataSource.
If no match found : returns
Get the nearest datapoint from the , based on the X location and the
This is a faster way to locate the nearest DataPoint from the collection, but it requires the collection to be sorted in ascending order. ( Signal | SignalXY )
Get the nearest datapoint from the , based on the X location and the
Contains logic for rendering fixed-length data in a streaming data logger.
Common operations using the default rendering system.
Font resolver that creates a typeface from a specified TTF file
Font resolver that creates a typeface from a specified TTF file
Attempt to create the typeface using the given settings.
Returns null if this resolver does not match the requested font.
Cross-platform tools for working with fonts
Collection of font resolvers that return typefaces from font names and style information
Add a font resolver that creates a typeface from a TTF file
This font is used for almost all text rendering.
Name of a sans-serif font present on the system
Name of a serif font present on the system
Name of a monospace font present on the system
Default system font name
Returns a typeface for the requested font name and style.
A cached typeface will be used if it exists,
otherwise one will be created, cached, and returned.
Use the characters in the string to determine an installed system font
most likely to support this character set.
Returns the system font if an ideal font cannot be determined.
Take a single text element ("grapheme cluster") as input,
and return one or more Unicode code points.
The code points are represented with signed ints since that is idiomatic for C#,
even though they are always unsigned values.
This class contains methods which generate sample data for testing and demonstration purposes
Return an array of evenly-spaced numbers
Return an array of sine waves between -1 and 1.
Values are multiplied by then shifted by .
Phase shifts the sine wave horizontally between 0 and 2 Pi.
Return an array for a sigmoidal curve that rises from zero to
Return an array of cosine waves between -1 and 1.
Values are multiplied by then shifted by .
Phase shifts the sine wave horizontally between 0 and 2 Pi.
An exponential curve that rises from 0 to
over points with random positive noise that scales
with the underlying signal. The rate constant of the exponential
curve is .
Generate a square wave by summing sine waves with decreasing amplitudes at odd harmonics of the fundamental frequency
Return values evenly spaced between to (inclusive)
Return values from to (inclusive) separated by
Return values from to (inclusive) separated by
Return values from to (inclusive)
Generates a 2D array of numbers with constant spacing.
The space between points.
The first point.
Generates a 2D sine pattern.
Frequency factor in x direction.
Frequency factor in y direction.
Intensity factor.
Generate a 2D array in a diagonal gradient pattern
Return a series of values starting with and
each randomly deviating from the previous by at most .
Return an array of random values
from to
Sequence of ascending numbers with random spacing between values.
RandomSample integer between zero (inclusive) and (exclusive)
RandomSample integer between (inclusive) and (exclusive)
RandomSample integers between zero (inclusive) and (exclusive)
RandomSample integers between (inclusive) and (exclusive)
RandomSample integer between 0 (inclusive) and 1 (exclusive)
RandomSample integer between 0 (inclusive) and (exclusive)
RandomSample integer between (inclusive) and (exclusive)
Return a number normally distributed around the given
according to the standard deviation.
Random numbers between zero (inclusive) and (exclusive)
Random numbers between (inclusive) and (exclusive)
Return a copy of the given array with random values added to each point
Mutate the given array by adding a random value to each point
Modify the array to add a sine wave with the given parameters
Return a new array containing the given one plus a sine wave with the given parameters
Date of the first ScottPlot commit
Evenly-spaced DateTimes
Generate a dark color by defining the maximum value to use for R, G, and B
Generic helper used to provide on supported types.
An appropriate for this type.
If the type is supported, this will be either or
If the type is unsupported, throws
Supported Types :
- All primitive types
- Types comparable via
- Types that implement
User actions that occur at a point in pixel space
Mouse actions that describe a button changing state
Describes something the uer did to interact with the plot
What the user engaged with
What the user did to the device
Name of the thing performing the action but no state.
E.g., "left button" or "shift key"
Description of both the input device and its state.
E.g., "left button released" or "shift key pressed"
Describes when the event happened.
Useful for distinguishing single from double-clicks.
Describes a class that has logic to watch user actions and manipulate the plot accordingly.
Perform the given action on the specified plot and return a result indicating what to do next.
Reset state to what it was when the action response was first created.
This method is called when the user processor resets (e.g., when the
control loses and re-gains focus or is disabled and re-enabled) and
is designed to reset responses like mouse-drag events that accumulate state.
Represents a single key on a keyboard that may be pressed and held.
Keys are tracked by and
classes can see which keys are pressed when they are executed.
A name that uniquely identifies a specific key
Tracks which keyboard keys are currently pressed.
This class stores logic for changing axis limits according to mouse inputs in pixel units.
Methods here are similar to those in except their inputs are all mouse events.
Represents a physical button on a mouse
Represents a physical button on a mouse
Describes what may need to happen after a user action response has completed executing
Request a render after all responses have finished executing
If true, all other responses will not be executed until the response
that returned this result returns a new result with this flag false.
Structures for commonly used keys.
Use these as a safer alternative to instantiating your own.
Structures for commonly used mouse buttons.
Use these as a safer alternative to instantiating your own.
Which mouse button to watch for double-clicks.
This action is invoked when a double-click occurs.
Replace this action with your own logic to customize double-click behavior.
Consecutive clicks are only considered a double-click if the time between the first
click mouse down and second click mouse up does not exceed this value.
When this key is held, pan actions will zoom instead
When this key is held, panning will occur in larger steps
When this key is held, panning will occur in single pixel steps
Which mouse button to watch for click-drag events
Vertical panning is disabled if any of these keys are pressed
Horizontal panning is disabled if any of these keys are pressed
Vertical panning is disabled when this is set
Horizontal panning is disabled when this is set
If enabled, mouse interactions over a single axis will be applied to all axes with the same orientation.
Vertical panning is disabled if any of these keys are pressed
Horizontal panning is disabled if any of these keys are pressed
Vertical panning is disabled when this is set
Horizontal panning is disabled when this is set
Scale the horizontal mouse sensitivity by this value.
Larger numbers result in more zooming for the same drag distance.
Scale the vertical mouse sensitivity by this value.
Larger numbers result in more zooming for the same drag distance.
If enabled, mouse interactions over a single axis will be applied to all axes with the same orientation.
Click-drag draws a rectangle over a plot which becomes the new field of view when released.
Click-drag draws a rectangle over a plot which becomes the new field of view when released.
A zoom rectangle is started when this button is pressed and dragged
A zoom rectangle is started when this button is pressed and dragged with held down
A zoom rectangle is started when is pressed and dragged with this key held down
When held, horizontal axis limits will not be modified
When held, vertical axis limits will not be modified
If enabled, when the mouse zooms while hovered over an axis only that axis will be changed.
If enabled with , all axes of the same direction will be changed together.
Fraction of the axis range to change when zooming in and out.
Which mouse button to watch for single-click events
This action is invoked when a single-click occurs.
Location of the previous mouse down event
This class collects user inputs and performs responses to manipulate a Plot.
Custom user input actions may be supplied, and the list of responses can be
modified to achieve total control over interaction behavior.
The plot this input processor will act on
Tracks which keys are currently pressed
Controls whether new events are processed.
Enabling this disables the older system.
Enable processing of user input events.
Disable processing of user input events. Effectively makes this control non-interactive.
A list of user input responses that processes all incoming events in order.
Users may manipulate this list to change the default behavior and
add custom behaviors.
Remove all user input responses of the specified type
Resets the user input responses to use the
default interactivity settings
Default user actions that are in place when the event processor is constructed or reset.
Helper method to enable or disable the default double-left-click benchmark behavior
Helper method to enable or disable the default left-click-drag pan behavior
Helper method to enable or disable the default left-click-drag pan behavior
When defined, this response is the only one that gets processed
until it returns a result indicating it is no longer the primary response.
Process a user input and return results of the responses that engaged with it
Reset state of all user action responses to do things like
abort mouse-down-drag actions or key press-and-hold actions
Contains settings and logic for how to draw an arrow
once the base and tip pixels have been determined
This interface describes a pair of 1D axes.
It is intended to be stored inside objects,
defining which axes they use and providing logic for coordinate/pixel conversions.
Describes the region in the center of the figure where plottable data will be displayed.
This region is set by the renderer immediately before a Plottable's Render() method is called.
This interface describes a 1D axis (horizontal or vertical).
Responsibilities include: min/max management, unit/pixel conversion,
tick generation (and rendering), axis label rendering,
and self-measurement for layout purposes.
Min/Max range currently displayed by this axis
Get the pixel position of a coordinate given the location and size of the data area
Get the coordinate of a pixel position given the location and size of the data area
Given a distance in coordinate space, converts to pixel space
A distance in coordinate units
The rectangle onto which the coordinates are mapped
The same distance in pixel units
Given a distance in pixel space, converts to coordinate space
A distance in pixel units
The rectangle onto which the coordinates are mapped
The same distance in coordinate units
Logic for determining tick positions and formatting tick labels
Replace the with a pre-loaded with the given ticks.
Use the to generate ticks with ideal spacing.
The label is the text displayed distal to the ticks
These rules are applied just before each render
Human readable name for this colormap
Returns the color of a position on this colormap (from 0 to 1).
Returns transparent if NaN.
Positions outside the range will be clamped.
Fractional distance along the colormap
Create a 1 by 256 bitmap displaying all values of a heatmap
Returns an array of colors evenly spaced along the colormap
The number of colors to get from the colormap.
The starting fraction in the colormap range from which to begin extracting colors (normalized to [0, 1]).
The ending fraction in the colormap range at which to stop extracting colors (normalized to [0, 1]).
Return the color for an item at index of a collection of size .
The and may be customized to restrict sampling to a portion of the colormap.
Internal interface used for Utility Functions within
When set true, should prefer paths that utilize
The length of the collection
Gets the closest index to a specified coordinate for the array of X's
typically the X coordinate should be used, unless the plot is rotated (then use Y)
Fastest execution should be using a BinarySearch, such as
Gets the X-Y coordinate from the data source at the specified index
Gets the X-Y coordinate from the data source at the specified index with any offsets and scaling applied
Gets the X value from the data source at the specified index
Gets the X value from the data source at the specified index with any offsets and scaling applied
Gets the Y value from the data source at the specified index
Gets the Y value from the data source at the specified index with any offsets and scaling applied
When the collection is sorted, this will enable much quicker execution by allowing usage of BinarySearch methods ( GetNearest should call GetXClosestIndex when this is true )
Provides functionality that converts a requested typeface into a physical font
Returns a new instance to a typeface that most closely matches the requested family name and style
Return the point nearest a specific location given the X/Y pixel scaling information from a previous render.
Will return if the nearest point is greater than pixels away.
Return the point nearest a specific X location given the X/Y pixel scaling information from a previous render.
Will return if the nearest point is greater than pixels away.
Implement this interface to create a custom grid
If populated, this text appears in the legend
Classes with a can implement this
to guide addition of standard shortcuts to its most commonly used properties.
This interface describes a class that decides how to lay-out a collection of panels around the
edges of a figure and create a final layout containing size and position of all panels
and also the size and position of the data area.
This interface is applied to plottables which modify axis limits at render time.
The update method is called at render time before the ticks are calculated.
Describes logic necessary to render a marker at a point
Number of subplots in this multiplot
Add (or remove) plots until the given number of subplots is achieved
Return the plot at the given index
Return all plots in this multiplot
This logic is used to create the initial layout for subplots in the multiplot
Set the position of the subplot at the given index
Link horizontal axis limits of the given collection of plots
so when one changes they all change in unison
Link vertical axis limits of the given collection of plots
so when one changes they all change in unison
Return the plot beneath the given pixel according to the last render.
Returns null if no render occurred or the pixel is not over a plot.
Returns only when the plot is successfully locked and rendering has stopped.
Releases the plot lock and permits rendering again.
Attempt to lock the plot and return whether a lock was achieved.
If true is returned, the plot is locked and rendering has stopped.
If false is returned, the plot was not successfully locked and rendering is permitted.
Returns whether true if the plot currently locked.
Returns whether true if the plot is locked by the calling thread.
All colors in this palette
Display name
Additional information such as the source of this palette
Return the Nth color (wrapping around if N is larger than the number of colors)
A panel is a rectangular region outside the data area of a plot.
Example panels include axes, colorbars, and titles
If false, the panel will not be displayed or report any size
Disallow the panel to be smaller than this
Disallow the panel to be larger than this
Return the size (in pixels) of the panel in the dimension perpendicular to the edge it lays on
Indicates which edge of the data rectangle this panel lays on
Draw this panel on a canvas
contains the canvas to draw on
dimensions of the data area (pixel units)
size of this panel (pixel units)
distance from the edge of this panel to the edge of the data area
Enable this to display extra information on the axis to facilitate development
Return the rectangle for this panel
Returns true for X axes (bottom and top)
Returns true for Y axes (left and right)
Strategy for generating a path that connects a collection of pixels
The primary displayed by this interactive control
The multiplot managed by this interactive control
Render the plot and update the image
This object takes in UI events and contains logic for how to respond to them.
This is a newer alternative to the older system.
Platform-specific logic for managing the context menu
Launch the default pop-up menu (typically in response to a right-click) at the given position in the control
Context for hardware-accelerated graphics (or null if not available)
Determine the DPI scaling ratio of the present display.
A value of 1.0 means no scaling, and 1.5 means 150% scaling.
This operation may be costly so do not call it frequently.
The value of the present display scaling.
Mouse positions are multiplied by this value for pixel/coordinate conversions.
Disposes the current Plot and creates a new one for the control
Loads the given Plot into the control
Any object that renders shapes on the canvas using scale information from the axes must implement this interface.
Toggles whether this plottable is shown and contributes to the automatic axis limit detection.
The calling method will check this variable (it does not need to be checked inside the Render method).
This object performs coordinate/pixel translation at render time based on the latest data area.
It stores the axes to use for this plottable and also the data area (in pixels) updated just before each render.
If this object is null it will be constructed using the default X and Y axes at render time.
Return the 2D area (in coordinate space) occupied by the data contained in this plottable
Draw the data from this plottable into the data area defined in the .
By default the surface is already clipped to the data area, but this can be cleared inside the plottable.
Items which will appear in the legend
This interface is applied to plottables which can be rendered directly on the GPU using an OpenGL shader
The control used to display this plottable.
It is used to access the at render time.
Used to manually synchronize rendering
Store OpenGL atributes
Restore previously saved OpenGL atributes
Plottables that implement this interface have a second render method that runs
after the axes are drawn, allowing graphics to be placed on top of the axes.
Represents a series of data points with distinct X and Y positions in coordinate space.
Return a copy of the data in format.
Return the point nearest a specific location given the X/Y pixel scaling information from a previous render.
Will return if the nearest point is greater than pixels away.
Return the point nearest a specific X location given the X/Y pixel scaling information from a previous render.
Will return if the nearest point is greater than pixels away.
This interface is used by plottables to access data while rendering.
This interface describes Y data sampled along an X axis at a fixed period.
X distance between Y points
X position of the first data point
Shift Y position of all values by this amount
Multiply Y values by this scale factor (before applying offset)
Do not display data above this index
Do not display data below this index
Returns range information about the data at a specific pixel location
Returns the predicted index for the data point nearest a given X position.
If clamped, the returned index will be clamped between 0 and Length - 1.
Returns the X position for a given index.
Returns the Y position for a given index.
Return an object for working with all Y values.
Y values between a range of indexes (inclusive).
Number of values in the data source
X position of the first data point
Shift Y position of all values by this amount
Multiply Y values by this scale factor (before applying offset)
Multiply X values by this scale factor (before applying offset)
Do not display data below this index
Do not display data above this index
If enabled, Xs will be vertical and Ys will be horizontal.
Return the axis limits covered by these data
Return pixels to render to display this signal.
May return one extra point on each side of the plot outside the data area.
Return the point nearest a specific location given the X/Y pixel scaling information from a previous render.
Will return if the nearest point is greater than pixels away.
Return the point nearest a specific X location given the X/Y pixel scaling information from a previous render.
Will return if the nearest point is greater than pixels away.
Ticks to display the next time the axis is rendered.
This array and its contents should not be modified directly.
Call Regenerate() to update this array.
Do not generate more than this number of ticks
Generate ticks based on the current settings and store the result in
Return the point nearest a specific location given the X/Y pixel scaling information from a previous render.
Will return if the nearest point is greater than pixels away.
Horizontal axis
Vertical axis
This struct holds values that define the first several bytes of a bitmap file.
Generate the layout by measuring all panels and adding
enough padding around the data area to fit them all exactly.
Generate a layout using a fixed rectangle for the data area
Generate a layout using a fixed rectangle for the data area
Generate layouts where the data area has a fixed padding from the edge of the figure
Generate layouts where the data area has a fixed padding from the edge of the figure
Generate layouts that match layouts of another control
Generate layouts that match layouts of another control
A collection of methods for making common adjustments to plot layouts
Automatically resize the layout on each render to achieve the best fit
Apply a fixed layout using the given rectangle to define the data area
Apply a fixed layout using the given padding to define space between the
data area and the edge of the figure
Disable visibility of all axes and titles so the data area fills the entire figure
Number of subplots in this multiplot
Copy styling options (e.g., background color) to new plots as they are added
If enabled, canvases passed into Render() methods will be cleared before plots are drawn on top of them.
This is helpful for interactive multiplots with layouts containing blank spaces to ensure drawings from previous
renders do not persist through multiple renders where figure dimensions change.
This list contains plots, logic for positioning them, and records of where they were last rendered
This logic is used to create the initial layout for subplots in the multiplot
Create a multiplot with no initial subplots
Create a multiplot with a single subplot
Reset this multiplot so it only contains the given plot
Create a new plot, add it as a subplot, and return it
Add the given plot as a subplot into this multiplot
Add (or remove) plots until the given number of subplots is achieved
Return the plot at the given index
Return all plots in this multiplot
Return the positioned subplot associated with the given plot
Set the position of the given subplot
Set the position of the given subplot index
Get the pixel rectangle where the given subplot was last rendered.
Returns PixelRect.NaN if a render has not yet occurred.
Render the multiplot into the clip boundary of the given surface.
Render the multiplot on a canvas inside the given rectangle.
Create a new image, render the multiplot onto it, and return it
Save the multiplot as a PNG image file
Return the plot beneath the given pixel according to the last render.
Returns null if no render occurred or the pixel is not over a plot.
Link horizontal axis limits of the given collection of plots
so when one changes they all change in unison
Link vertical axis limits of the given collection of plots
so when one changes they all change in unison
Colors defined according to W3C standard keywords
https://www.w3.org/wiki/CSS/Properties/color/keywords
Colors defined according to results of the xkcd color name survey
https://xkcd.com/color/rgb/
This class contains type-specific methods to convert between generic values and doubles
optimized for performance using platform-specific features.
See discussion in https://github.com/ScottPlot/ScottPlot/pull/1927
Returns the double value of a
using a conversion technique optimized for the platform.
Returns the double value of the at position in
using a conversion technique optimized for the platform.
Returns the double value of the at position in
using a conversion technique optimized for the platform.
Creates a for a given double
using a conversion technique optimized for the platform.
Convert a DateTime into a number that can be plotted on a numeric axis
An axis panel which displays a colormap and range of values
An axis panel which displays a colormap and range of values
Axis (spine, ticks, label, etc) for the colorbar
Thickness of the colorbar image (in pixels)
Title for the colorbar, displayed outside the ticks.
Title for the colorbar, displayed outside the ticks.
Return a rectangle encapsulating the colormap
bitmap plus the axis and ticks.
Return the rectangle to the side of the data area
where the colormap bitmap will be drawn.
Enable this to center the panel using the full width of the figure rather than
centering it over the width of the data area.
Extra space to add above the title text so the title does not touch the edge of the image
Connect points with Catmull-Rom cubic splines, see https://doi.org/10.1007/s42979-021-00770-x
NaN values will be skipped, producing a gap in the path.
Organize into segments of connected points padded with empty points at the front and back
Pixels
IEnumerable of arrays representing the segments
Connect points with curved lines which ease into and out of the midpoint between each pair.
This strategy does not "overshoot" points in the Y direction.
Connect points with straight lines.
NaN values will be skipped, producing a gap in the path.
Style for the background of the entire figure
Style for the data area (the area within the axis frames)
This object is locked by the Render() methods.
Logic that manipulates the plot (UI inputs or editing data)
can lock this object to prevent rendering artifacts.
In GUI environments this property holds a reference to the interactive plot control
Return the location on the screen (pixel) for a location on the plot (coordinates) on the default axes.
The figure size and layout referenced will be the one from the last render.
Return the location on the screen (pixel) for a location on the plot (coordinates) on the given axes.
The figure size and layout referenced will be the one from the last render.
Return the coordinate for a specific pixel using measurements from the most recent render.
Return the coordinate for a specific pixel using measurements from the most recent render.
Return a coordinate rectangle centered at a pixel. Uses measurements
from the most recent render.
Center point pixel's x
Center point pixel's y
Radius in pixels
The coordinate rectangle
Return a coordinate rectangle centered at a pixel. Uses measurements
from the most recent render.
Center point pixel
Radius in pixels
The coordinate rectangle
Return a coordinate rectangle centered at a coordinate pair with the
radius specified in pixels. Uses measurements from the most recent
render.
Center point in coordinate units
Radius in pixels
The coordinate rectangle
Get the axis under a given pixel
Point
The axis at (or null)
Get the panel under a given pixel
Point
The panel at (or null)
Create a new image of the given dimensions, render the plot onto it, and return it.
Render onto an existing canvas with the given dimensions
Render onto an existing canvas inside the given rectangle
Render onto an existing canvas of a surface over the local clip bounds
Render the plot and return an HTML img element containing a Base64-encoded PNG
Render the plot and return a plain text SVG element suitable for insertion into HTML
Returns the content of the legend as a raster image
Returns the content of the legend as SVG (vector) image
Return contents of .
Return all plottables in of the given type.
Remove the given plottable from the .
Remove the given Panel from the .
Remove the given Axis from the .
Remove all items of a specific type from the .
Remove a all instances of a specific type from the .
Type of to be removed
Remove all instances of a specific type from the
that meet the criteraia.
A function to test each element for a condition.
Type of to be removed
Move the indicated plottable to the end of the list so it is rendered last
and appears above all other plottables.
Move the indicated plottable to the start of the list so it is rendered first
and appears below all other plottables.
Move the indicated plottable to the end of the list so it is rendered last
Move the indicated plottable to the start of the list so it is rendered first
Disable visibility for all axes and grids
Disable visibility for all grids
Enable visibility for all grids
Helper method for setting visibility of the
Helper method for setting visibility of the
and setting to the provided one.
Helper method for setting the Legend's IsVisible, Alignment, and Orientation
properties all at once.
Helper method for displaying specific items in the legend
Hide the default legend (inside the data area) and create a new legend panel
placed on the edge of the figure outside the data area.
Helper method for setting visibility of the
Clears the list
Clear a all instances of a specific type from the .
Type of to be cleared
Shortcut to set text of the Label.
Assign properties of Label to customize size, color, font, etc.
Shortcut to set text of the Label
Assign properties of Label to customize size, color, font, etc.
Shortcut to set text of the Label
Assign properties of Label to customize size, color, font, etc.
Return the current style settings for this plot
Apply the given style settings to this plot
Apply the style settings from the given plot to this plot
Helper methods to create plottable objects and add them to the plot
Helper methods to create plottable objects and add them to the plot
Color set used for adding new plottables
Return the next color of the .
Colors reset if is cleared.
Fill the vertical range between two Y points for each X point
Fill the vertical range between two Y points for each X point
Fill the vertical range between two Y points for each X point
Fill the vertical range between two Y points for each X point
This overload uses a custom function to calculate X, Y1, and Y2 values
Create a bar plot to represent a collection of named ranges
Place a stacked bar chart at a single position
The annotation will be placed inside this fractional portion of the data area
according to and
Holds a collection of individually styled bars
Apply a fill color to all bars
Define orientation for all bars
Displays 1 or more boxes all styled the same
Controls whether the tip of the bracket is counter-clockwise from the line formed by the bracket base.
Size of the small lines (in pixels) placed the edges of the bracket and between the center of the bracket and the label
Text displayed near the center of the bracket
X position of candles is sourced from the OHLC's DateTime by default.
If this option is enabled, X position will be an ascending integers starting at 0 with no gaps.
Fractional width of the candle symbol relative to its time span
If defined, contour lines will be drawn at this height and will be ignored.
If defined, contour lines will be drawn at this height and will be ignored.
Update contour lines from arbitrarily placed data points.
Update contour lines from a rectangular grid of coordinates
The style of lines to use when connecting points.
Get the data point nearest to the given mouse location.
Mouse location
Data rectangle from RenderDetails
Maximum distance to the point
Get the data point nearest to the given mouse location (only considering X values).
Mouse location
Data rectangle from RenderDetails
Maximum X distance to the point
Automatically expand the axis as needed to ensure the full dataset is visible before each render.
Automatically adjust the axis limits to track the newest data as it comes in.
The axis limits will appear to "jump" when new data runs off the screen.
Automatically adjust the axis limits to track the newest data as it comes in.
The axis limits will appear to "slide" continuously as new data is added.
Returns true if data has been added since the last render
If enabled, axis limits will be adjusted automatically if new data runs off the screen.
Contains logic for automatically adjusting axis limits if new data runs off the screen.
Only used if is true.
Used to obtain the current axis limits so can adjust them if needed.
Logic for displaying the fixed-length Y values in
Shift in a new Y value
Shift in a collection of new Y values
Clear the buffer by setting all Y points to the given value
Display the data using a view where new data overlaps old data from left to right.
Display the data using a view where new data overlaps old data from right to left.
Display the data using a view that continuously shifts data to the left, placing the newest data on the right.
Display the data using a view that continuously shifts data to the right, placing the newest data on the left.
Display the data using a custom rendering function
Horizontal radius (axis units)
Horizontal radius (axis units)
Rotation of the ellipse (degrees)
Creates an empty RangePlot plot, call SetDataSource() to set the coordinates.
Creates a RangePlot plot from two scatter plots.
This plottable renders date tick labels for financial charts where
data is displayed sequentially along the horizontal axis despite
DateTimes not being evenly spaced (e.g., data may include gaps)
This plottable renders date tick labels for financial charts where
data is displayed sequentially along the horizontal axis despite
DateTimes not being evenly spaced (e.g., data may include gaps)
This plottable renders an axis line, ticks, and tick labels inside the data area
Data values for the heatmap.
must be called after changing this array or editing its values.
Indicates position of the data point relative to the rectangle used to represent it.
An alignment of upper right means the rectangle will appear to the lower left of the point itself.
If defined, the this rectangle sets the axis boundaries of heatmap data.
Note that the actual heatmap area is 1 cell larger than this rectangle.
Assign to set the edges of the heatmap rectangle.
If defined, the heatmap will be rendered within the edges of this rectangle.
If defined, the this rectangle sets the axis boundaries of heatmap data.
Note that the actual heatmap area is 1 cell larger than this rectangle.
This variable controls whether row 0 of the 2D source array is the top or bottom of the heatmap.
When set to false (default), row 0 is the top of the heatmap.
When set to true, row 0 of the source data will be displayed at the bottom.
This variable controls whether the first sample in each column of the 2D source array is the left or right of the heatmap.
When set to false (default), sample 0 is the left of the heatmap.
When set to true, sample 0 of the source data will be displayed at the right.
If true, pixels in the final image will be interpolated to give the heatmap a smooth appearance.
If false, the heatmap will appear as individual rectangles with sharp edges.
Actual extent of the heatmap bitmap after alignment has been applied
Extent used at render time.
Supplies the user-provided extent if available,
otherwise a heatmap centered at the origin with cell size 1.
Width of a single cell from the heatmap (in coordinate units)
Height of a single cell from the heatmap (in coordinate units)
Defines what color will be used to fill cells containing NaN.
If present, this array defines transparency for each cell in the heatmap.
Values range from 0 (transparent) through 255 (opaque).
Controls the opacity of the entire heatmap from 0 (transparent) to 1 (opaque)
Height of the heatmap data (rows)
Width of the heatmap data (columns)
Generated and stored when is called
Return heatmap as an array of ARGB values,
scaled according to the heatmap setting,
and in the order necessary to create a bitmap.
Regenerate the image using the present settings and data in
Return the position in the array beneath the given point
Return the value of the cell beneath the given point.
Returns NaN if the point is outside the heatmap area.
Range of values spanned by the data the last time it was updated
If supplied, the colormap will span this range of values
This class wraps an to give it a
pixel-based hit detection map that can be used for mouse interaction
Returns true if the plottable is within
pixels of the given
A line at a defined Y position that spans the entire horizontal space of the data area
A horizontal span marks the full vertical range between two horizontal values
X position of each symbol is sourced from the OHLC's DateTime by default.
If this option is enabled, X position will be an ascending integers starting at 0 with no gaps.
Fractional width of the OHLC symbol relative to its time span
A Phasor plot marks a collection of points in polar space using an
arrow with its base centered at the origin.
A collection of points in polar space
If populated, will be labeled with these strings
Style for arrow labels defined in
Additional padding given to accommodate spoke labels
Additional padding given to accommodate labels
Enable this to modify the axis limits at render time to achieve "square axes"
where the units/px values are equal for horizontal and vertical axes, allowing
circles to always appear as circles instead of ellipses.
A polar axes uses spoke lines and circles to describe a polar coordinate system
where points are represented by a radius and angle.
This class draws a polar axes and has options to customize spokes and circles.
Spokes are straight lines that extend outward from the origin
Radial positions describing concentric circles centered on the origin
Rotates the axis clockwise from its default position (where 0 points right)
If enabled, radial ticks will be drawn using straight lines connecting intersections circles and spokes
Enable this to modify the axis limits at render time to achieve "square axes"
where the units/px values are equal for horizontal and vertical axes, allowing
circles to always appear as circles instead of ellipses.
Create ticks (circles) evenly spaced between 0 and
Clear existing circles and add new ones at the defined positions.
Clear existing circles and add new ones at the defined positions with the given labels.
Replace existing spokes with a new set evenly spaced around the circle.
Replace existing spokes with new ones placed at the specified angles
Replace existing spokes with new ones that have the given labels evenly spaced around the circle
Return the X/Y position of a point defined in polar space
Return the X/Y position of a point defined in polar space
Return the X/Y position of a point defined in polar space
Return coordinates for the given radius values assuming one value per spoke.
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.
Creates a new polygon.
The axis dependant vertex coordinates.
The polar axis drawn beneath each radar series polygon
A collection of RadarSeries, each of which hold a set of values and the styling information that controls how the shape is rendered
Enable this to modify the axis limits at render time to achieve "square axes"
where the units/px values are equal for horizontal and vertical axes, allowing
circles to always appear as circles instead of ellipses.
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
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
Distance of the corner of the scalebar from the corner of the data area
Padding to add between labels and scalebar lines
The style of lines to use when connecting points.
Controls whether points are connected by smooth or straight lines
Setting this value enables and sets the curve tension.
Low tensions tend to "overshoot" data points.
High tensions begin to approach connecting points with straight lines.
Strategy to use for generating the path used to connect points
Convert scatter plot points (connected by diagonal lines) to step plot points (connected by right angles)
by inserting an extra point between each of the original data points to result in L-shaped steps.
Array of corner positions
Indicates that a line will extend to the right before rising or falling.
Returns an optimized to work with when having to iterate across the collection of points
Maximum size of the marker (in pixels) to display
at each data point when the plot is zoomed far in.
Setting this flag causes lines to be drawn between every visible point
(similar to scatter plots) to improve anti-aliasing in static images.
Setting this will decrease performance for large datasets
and is not recommended for interactive environments.
Renders each point connected by a single line, like a scatter plot.
Call this when zoomed in enough that no pixel could contain two points.
Renders the plot by filling-in pixel columns according the extremes of Y data ranges.
Call this when zoomed out enough that one X pixel column may contain two or more points.
The style of lines to use when connecting points.
A polar axes uses spoke lines and circles to describe a polar coordinate system
where points are represented by a radius and angle.
This class draws a polar axes and has options to customize spokes and circles.
Calculate the angle of the target point relative to the center of the circle.
Target point.
The coordinates of the center of the circle.
Calculates a point on a specified angle base.
The coordinates of the center of the circle.
radius of circle.
Angle of target point.
Point coordinates at a specified angle on the circle.
Concentric circular tick lines
Curves extending from the right side of the outer circle to various points around its circumference
Rotates the axis clockwise from its default position (where 0 points right)
Enable this to modify the axis limits at render time to achieve "square axes"
where the units/px values are equal for horizontal and vertical axes, allowing
circles to always appear as circles instead of ellipses.
Default style of the curved lines extending from the right edge
to points around the circumference of the chart outline
Default style of the concentric circular axis lines
Distance to offset label text
Return the X/Y position of a point defined in polar space
Return the X/Y position of a point defined in polar space
Return the X/Y position of the given impedance
This plottable contains logic to modify tick labels to display them
using scientific notation with a multiplier displaed as text
placed just outside the corner of the data area.
The axis this tick modifier will modify tick labels for
This logic determines where the text will be placed relative to the data area
This logic determines how to display the exponent as a string
This plot type places a triangular axis on the plot
and has methods to convert between triangular and Cartesian coordinates.
This plot type places a triangular axis on the plot
and has methods to convert between triangular and Cartesian coordinates.
Return coordinates for a point on the triangle for a fractional distance
(0 through 1, inclusive) along the bottom and left axes.
Return coordinates for a point on the triangle for a fractional distance
(0 through 1, inclusive) along all three axes. This overload requires
the sum of and to equal 1.
Length (in pixels) of the longest arrow
A line at a defined X position that spans the entire vertical space of the data area
A vertical span marks the full horizontal range between two vertical values
The shaded region on the plot when the user middle-click-drags to zoom
The shaded region on the plot when the user middle-click-drags to zoom
Represents the location of a point relative to a rectangle.
UpperLeft means the point is at the top left of the rectangle.
The arrow will always be rendered to be at least this long (in pixels).
If too small, its base will move away from the tip.
The arrow will always be rendered to its length never exceeds this value (in pixels).
If too large, its base will move toward the tip.
Back the arrow away from its tip along its axis by this many pixels
This object holds an X axis and Y axis and performs 2D coordinate/pixel conversions
This object represents the rectangular visible area on a 2D coordinate system.
It simply stores a but has axis-related methods to act upon it.
Return a new expanded to include the given and .
Return a new expanded to include the given .
Return a new expanded to include all corners of the given .
Return a new expanded to include the area defined by .
Represents a single bar in a bar chart
Size of the error bar extending from
Width of the error bar whiskers in axis units (same units as )
Holds a collection of bars which are all styled the same and have a common label
Holds values for drawing a box-and-whisker symbol
This object manages wraps a SKCanvas and manages calls
to SkiaSharp methods to ensure state is tracked across
complex render systems.
This object manages wraps a SKCanvas and manages calls
to SkiaSharp methods to ensure state is tracked across
complex render systems.
Number of times was called without
Save the current state of the canvas.
This state can be recalled by calling .
Restore the canvas to the state the last time was called.
This method will throw if a canvas is restored more times than it was saved.
Use the method to restore a canvas to its
original state if the number of saves is unknown.
Restore the canvas to its original state, regardless
of how many times was called.
Restore the canvas to its original state.
Disables all clipping and transformations.
Clip the canvas so drawing will only occur within the given rectangle.
Create a collection of colors from a collection of hex strings formatted like "#66AA99"
Create a ScottPlot color from a System Drawing Color
return a string like "#6699AA" or "#6699AA42" if a semitransparent alpha is in use
Create a ScottPlot color from a SkiaSharp Color
Create a ScottPlot color from a System Drawing Color
return a string like "#6699AA"
return a string like "#6699AAFF"
Create a SkiaSharp color
Luminance as a fraction from 0 to 1
Hue as a fraction from 0 to 1
Saturation as a fraction from 0 to 1
Hue, Saturation, and Luminance (as fractions from 0 to 1)
Create a Color given Hue, Saturation, and Luminance (as fractions from 0 to 1)
Amount to lighten the color (from 0-1).
Larger numbers produce lighter results.
Amount to darken the color (from 0-1).
Larger numbers produce darker results.
Return this color mixed with another color.
Color to mix with this color
Fraction of to use
Return an array containing every available colormap
Default Windows Colors
Colors from the xkcd color name survey
https://xkcd.com/color/rgb/
Return a collection of colors with random hues.
Because hues are random, near-matches may be present.
Return a collection of colors with maximum saturation and evenly-spaced hues
Connect points with straight lines
Connect points with a line horizontally, then vertically
Connect points with a line vertically, then horizontally
Represents a single item in a right-click pop-up menu
Represents a straight line in coordinate space
Adjust the line to fit within the boundaries of the given rectangle.
The slope and Y intercept will not be changed.
Return the X position on the line at the given Y
Return the Y position on the line at the given X
Represents a range of values between a pair of bounding coordinates on a single axis.
Inverted ranges are permitted, but is always less than
and indicates whether this range is inverted.
Represents a range of values between a pair of bounding coordinates on a single axis.
Inverted ranges are permitted, but is always less than
and indicates whether this range is inverted.
Distance from to (may be negative)
Value located in the center of the range, between and (may be negative)
Distance from to (always positive)
Return the present range rectified so is not greater than
This magic value is used to indicate the range has not been set.
It is equal to an inverted infinite range [∞, -∞]
This magic value is used to indicate the range has no defined limits.
It is equal to an inverted infinite range [NaN, NaN]
Returns true if the given position is within the range (inclusive)
Indicates whether two ranges have any overlapping values
Return the range of values spanned by the given collection (ignoring NaN)
Return a new range expanded to include the given point
Represents a range of values between two coordinates on a single axis
Returns true if the given position is within the range (inclusive)
Expand the range if needed to include the given point
Expand this range if needed to ensure the given range is included
Expand this range if needed to ensure the given range is included
This infinite inverted range is used to indicate a range that has not yet been set
Reset this range to inverted infinite values to indicate the range has not yet been set
Describes a rectangle in 2D coordinate space.
Represents a point in coordinate space (X and Y axis units)
Define a new coordinate at the given X and Y location (in axis units)
Create an array of coordinates from individual arrays of X and Y positions
The inverse of the present coordinate. E.g., the point (X, Y) becomes (Y, X).
Represents a 3d point in coordinate space
Represents a specific point in a DataSource
True for bottom and top axes
True for left and right axes
A stateful analog to deisgned to expand to include given data
Create a new set of expanding axis limits with no leimits set initially
Create a new set of expanding axis limits starting from the given axis limits
Expanded limits to include the given and .
Expanded limits to include the given .
Expanded limits to include the given .
Expanded limits to include the given .
Expanded limits to include the given .
Expanded limits to include the given .
This configuration object (reference type) permanently lives inside objects which require styling.
It is recommended to use this object as an init-only property.
This configuration object (reference type) permanently lives inside objects which require styling.
It is recommended to use this object as an init-only property.
Use the characters in to determine an installed
system font most likely to support this character set.
Describes a rectangular region of a larger rectangle using fractional units
Describes the geometry of a color gradient used to fill an area
Get or set the start angle in degrees for sweep gradient
Get or set the end angle in degrees for sweep gradient
Get or set how the shader should handle drawing outside the original bounds.
Start of linear gradient
End of linear gradient
Colors used for the gradient, or null to use the Hatch colors.
Get or set the positions (in the range of 0..1) of each corresponding color,
or null to evenly distribute the colors.
Describes the geometry of a color gradient used to fill an area
When set to false the grid will be rendered on top of plottables instead of beneath them.
Fill the region between every other pair of major grid lines with this color.
Fill the region between every other pair of major grid lines with this color.
Contains logic for determining new axis limits when Autoscale() is called
Return the recommended axis limits for the plottables that use the given axes
Autoscale every unset axis used by plottables.
An axis manager contains logic to suggest axis limits
given the current view and size of the data.
Returns the recommended X axis range given the current view and size of the data
X axis view range
X axis data range
Returns the recommended Y axis range given the current view and size of the data
Y axis view range
Y axis view range
Return recommended axis limits given the current view and size of the data
Bitmap representation of a
SkiaSharp cannot natively create BMP files.
This function creates bitmaps in memory manually.
https://github.com/mono/SkiaSharp/issues/320
Describes how to size and position an image inside a given rectangle
Image placed at the upper-left of the rectangle with no scaling.
Image placed at the center of the rectangle with no scaling.
Fill image in X and Y to completely fill the area.
The aspect ratio may change, appearing to distort the image.
Scale the image as large as possible such that it will fit
entirely within the rectangle. This may result in whitespace
on the edges if the image and rectangle have different aspect ratios.
Return the image rectangle to display inside a target rectangle
Represents a range of indexes in an array (inclusive)
Represents a range of indexes in an array (inclusive)
The IndexRange that represents an empty collection
Set this to globally enable support for right-to-left (RTL) languages
Rotation in degrees clockwise from 0 (horizontal text)
Manually defined line height in pixels.
If not defined, the default line spacing will be used (according to the typeface, size, etc.)
If supplied, this label will be displayed as an image and its text and styling properties will be ignored
Use the characters in to determine an installed
system font most likely to support this character set.
Return size information for the contents of the property
Return size information for the given text
Use the Label's size and to determine where it should be drawn
relative to the given rectangle (aligned to the rectangle according to ).
Classes with a can inherit this
to include shortcuts to its most commonly used properties.
Size of the figure this layout represents
Final size of the data area
Distance (pixels) each panel is to be placed from the edge of the data rectangle
Size (pixels) of each panel in the dimension perpendicular to the data edge it is placed on
Position of the legend relative to the data area
Position of the legend relative to the data area
Stack items in the legend according to this preferred orientation
Distance from the edge of the data area to the edge of the legend
Distance between the legend frame and the items within it
Width of the symbol in a legend item
Padding between a symbol and label within a legend item
Space separating legend items
Items in this list will always be displayed in the legend
If enabled, items in horizontal oriented legends will not
be aligned in columns but instead resized tightly to fit their contents
Enabling this allows multi-language text in the figure legend,
but may slow down the render loop.
If set, this overrides the value in the LegendItem's FontStyle
If set, this overrides the value in the LegendItem's FontStyle
If set, this overrides the value in the LegendItem's FontStyle
If enabled, the legend will include items from hidden plottables.
They will be partially painted over using the background color to simulate semitransparency.
This property controls how visible legend items are when their parent control's visibility is disabled.
This property is only used when is enabled.
Return an Image containing just the legend
Return contents of a SVG image containing just the legend
This is called automatically by the render manager
Plottable this legend item is associated with
Create a default line using x and y values
Create a default line using coordinates
Create a styled line using x and y values, LinePattern, and LineStyle information
Create a styled line using coordinates, LinePattern, and LineStyle information
This configuration object (reference type) permanently lives inside objects which require styling.
It is recommended to use this object as an init-only property.
Width of the line (in pixels)
If enabled, is ignored and lines are rendered as a single pixel (regardless of scale factor)
If enabled will make this line appear hand drawn.
Describes X/Y location in pixel or coordinate space
Standard markers supported by ScottPlot.
See demo app for information about creating custom marker shapes.
Get the marker object for a standard marker shape
This configuration object (reference type) permanently lives inside objects which require styling.
It is recommended to use this object as an init-only property.
Diameter of the marker (in pixels)
Size of the entire multiline label in pixels.
Width is the largest value returned by paint.MeasureText().
Height is the line height multiplied by the number of lines.
Vertical spacing between each line.
This is the value returned by GetFontMetrics().
Width of each line of text in pixel units.
Recommended vertical offset when calling SKCanvas.DrawText().
See https://github.com/ScottPlot/ScottPlot/issues/3700 for details.
Distance below the baseline the rendered font may occupy.
Width of the entire text.
Equals the length of the widest line.
Height of the entire text.
Return a rectangle representing the bounding box of the entire text
with the alignment point centered at the origin.
Stores the for all axes on the plot
and has methods that can be used to recall them at a future point in time.
Stores the for all axes on the plot
and has methods that can be used to recall them at a future point in time.
Set all axis limits to their original ranges
Create a custom palette from an array of colors
Create a custom palette from an array of colors
Return an array containing every available palette
Represents an X/Y location on screen in pixel units.
Pixels in screen units are distinct from with axis units.
Pixels use precision, whereas use precision.
Horizontal position on the screen in pixel units.
Larger numbers are farther right on the screen.
Vertical position on the screen in pixel units.
Larger numbers are lower on the screen.
Create a pixel, casting values into ones with precision
Create a pixel, casting values into ones with precision
Represents an invalid pixel location
Convert the ScottPlot pixel to a SkiaSharp point
This data structure describes a single vertical column of pixels
that represents the Y span of an X range of data points.
Represents a distance in pixel units
Describes a straight line in pixel space
Return the X position on the line at the given Y
Return the Y position on the line at the given X
Represents the distance from one pixel relative to another in pixel units.
Increasing X offset moves a pixel to the right.
Increasing Y offset moves a pixel downward.
Represents the distance from one pixel relative to another in pixel units.
Increasing X offset moves a pixel to the right.
Increasing Y offset moves a pixel downward.
Represents the size (in pixels) of padding on all edges of a rectangle
Represents a range of pixels between two pixels on the horizontal axis.
The value of will be SMALLER than the value of .
Represents a range of pixels between two pixels on the horizontal axis.
The value of will be SMALLER than the value of .
Represents a range of pixels between two pixels on the vertical axis used in Signal plots.
The value of will be SMALLER than the value of .
Represents a range of pixels between two pixels on the vertical axis used in Signal plots.
The value of will be SMALLER than the value of .
Create a rectangle from the bounding box of a circle centered at with radius
Create a rectangle with edges at the given pixel positions.
This constructor will rectify the points so rectangles will always have positive area.
Create a rectangle representing pixels on a screen
Create a rectangle representing pixels on a screen
Create a rectangle representing pixels on a screen
Create a rectangle representing pixels on a screen
Create a rectangle representing pixels on a screen
Create a rectangle representing pixels on a screen
Create a rectangle representing pixels on a screen
Create a rectangle from the given edges.
This constructor permits inverted rectangles with negative area.
Create a pixel rectangle from two pixel ranges
Returns the intersection with another rectangle
Other rectangle
Intersection rectangle
Return the position of this rectangle aligned inside a larger one
Return the position of this rectangle aligned inside a larger one
Launch a web browser to a URL using a command appropriate for the operating system
This object holds many common plot style customizations
and facilitates switching between styles or copying styles
from one plot to another.
Apply these style settings to the given plot
Return the styles represented by the given plot
Return a plot style with all values nulled except those
that are different than the given style
A polar axis tick describes the radius of a circle centered at the origin
and includes the styling information required to render it
A polar axis tick describes the radius of a circle centered at the origin
and includes the styling information required to render it
A straight line extending outward from the origin
A straight line extending outward from the origin
Represents a point in polar coordinate space
Represents a point in polar coordinate space
Defines values and styling information for displaying a single shape on a radar 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
Represents a range between any two finite values (inclusive)
Returns the given value as a fraction of the difference between Min and Max. This is a min-max feature scaling.
The value to normalize
If true, values outside of the range will be clamped onto the interval [0, 1].
The normalized value
Returns the given value clamped to the range (inclusive).
Details about a completed render
Size of the plot image in pixel units
Size of the data area of the plot in pixel units
Distance between the data area and the edge of the figure
Total time required to render this image
Time the render was completed
Each step of the render and how long it took to execute
Axis limits of the primary axes for this render
Axis limits of the primary axes for the previous render
Axis limits for every axis
Axis limits of all axes from the previous render
Indicates whether the axis view (coordinate units) of this render differs from the previous
Indicates whether the size (pixels) of this render differs from the previous
Arrangement of all panels
The number of total renders including this one
Search the for the specified and calculate the pixels per unit
the X-Axis to search for
the pxPerUnitX
if the axis was in the collection and a result was calculated. Otherwise
When false, the will be set to
Search the for the specified and calculate the pixels per unit
the Y-Axis to search for
the pxPerUnitX
if the axis was in the collection and a result was calculated. Otherwise
When false, the will be set to
Search the for the specified and calculate the pixels per unit
the X-Axis to search for
the pxPerUnitX
if the axis was in the collection and a result was calculated. Otherwise
When false, the will be set to
Search the for the specified and calculate the pixels per unit
the Y-Axis to search for
the pxPerUnitX
if the axis was in the collection and a result was calculated. Otherwise
When false, the will be set to
Represents a vector at a point in coordinate space
Represents a vector at a point in coordinate space
Angle of the vector in radians
Length of the vector squared in coordinate units
Length of the vector in coordinate units
Represents a vector at a point in pixel space
Represents a vector at a point in pixel space
Angle of the vector in radians
Length of the vector squared in pixel units
Length of the vector in pixel units
Represents a label at a corner of the triangular plot triangle and includes styling information.
Return the point along this axis a given fraction between 0 and 1
Global random number generator, to ensure each generator will returns different data.
Using ThreadLocal, because Random is not thread safe.
To select right random number generator
Create a random number generator.
The seed is random by default, but could be fixed to the defined value
Return a uniformly random number between 0 (inclusive) and 1 (exclusive)
Return a uniformly random number between 0 (inclusive) and (exclusive)
Return a uniformly random number between (inclusive) and (exclusive)
Return a random number guaranteed not to be zero
Return a random integer up to the maximum integer size
Return a random byte (0-255)
Return a random byte between the given values (inclusive)
Return a random integer between zero (inclusive) and (exclusive)
Return a random integer between (inclusive) and (exclusive)
Return a number normally distributed around the given
according to the standard deviation.
Mutate the given array by adding noise (± magnitude) and return it
Return a copy of the given data with random noise added (± magnitude)
Uniformly distributed random numbers between 0 and 1
(multiplied by then added to ).
Return a collection of numbers normally distributed around the given
according to the standard deviation.
Sine wave with random frequency, amplitude, and phase
A sequence of numbers that starts at
and "walks" randomly from one point to the next, scaled by
with an approximate slope of .
Return a collection OHLCs representing random price action
Return a collection OHLCs representing random price action
This list of actions is performed in sequence to render a plot.
It may be modified externally to inject custom functionality.
Information about the previous render
These events are invoked before any render action.
Users can add blocking code to this event to ensure processes
that modify plottables are complete before rendering begins.
Alternatively, lock the object.
This event is invoked just before each render,
after axis limits are determined and axis limits are set
This event is invoked after each render
This event a render where the figure size (in pixels) changed from the previous render
This event is invoked during a render where the axis limits (in coordinate units) changed from the previous render
This event occurs after render actions are performed.
Prevents from being invoked in situations that may cause infinite loops
Indicates whether this plot is in the process of executing a render
If false, any calls to Render() return immediately
Total number of renders completed
Remove all render actions of the given type
This object pairs a Plot with pixel/canvas information
and is passed throughout the render system to provide
screen and canvas information to methods performing rendering.
This object pairs a Plot with pixel/canvas information
and is passed throughout the render system to provide
screen and canvas information to methods performing rendering.
Uses the layout engine to measure panels and set the
Layout and DataRect for this render pack
Sample data used for testing
The first 100 prime numbers
The Mona Lisa represented as as a 2D array (65 x 100)
of grayscale values from 0 (dark) to 255 (bright)
Return the sample sum.
Return the sample sum.
Return the sample mean.
Return the sample median.
Return the median of a sorted sample.
Return the percentile of a sorted sample.
Return the percentile of a sample.
Return the sample mean.
Return the sample variance (second moment about the mean) of data.
Input must contain at least two values.
Use this function when your data is a sample from a population.
To calculate the variance from the entire population use .
Return the sample variance (second moment about the mean) of data.
Input must contain at least two values.
Use this function to calculate the variance from the entire population.
To estimate the variance from a sample, use .
Return the sample variance (second moment about the mean) of data.
Input must contain at least two values.
Use this function to calculate the variance from the entire population.
To estimate the variance from a sample, use .
Return the sample variance (second moment about the mean) of data.
Input must contain at least two values.
Use this function to calculate the variance from the entire population.
To estimate the variance from a sample, use .
Return the sample standard deviation (the square root of the sample variance).
Return the sample standard deviation (the square root of the sample variance).
Return the population standard deviation (the square root of the population variance).
See VarianceP() for more information.
Return the population standard deviation (the square root of the population variance).
See VarianceP() for more information.
Standard error of the mean.
Return the sample mean. NaN values are ignored.
Returns NaN if all values are NaN.
Return the sample variance (second moment about the mean) of data.
Input must contain at least two values. NaN values are ignored.
Use this function when your data is a sample from a population.
To calculate the variance from the entire population use .
Return the sample variance (second moment about the mean) of data.
Input must contain at least two values. NaN values are ignored.
Use this function when your data is a sample from a population.
To calculate the variance from the entire population use .
Return the sample standard deviation (the square root of the sample variance).
NaN values are ignored.
Return the population standard deviation (the square root of the sample variance).
NaN values are ignored.
Standard error of the mean.
NaN values are ignored.
Transpose a multidimensional (not jagged) array
Extracts a row or column from a 2D array
A histogram that accumulates the number of values observed in a continuous range of user defined bins
Number of values in each bin
Lower edge of each bin
Lower edge of each bin plus a final value representing the upper edge of the last bin
Size of the first bin (distance between the first pair of bin edges)
If enabled, values below or above the bin range will be accumulated in the lowest or highest bin
A collection of bins of size
where the first bin's left edge is
and the last bin's left edge is
A collection of bins of size starting from the smallest value in
and increasing to include the largest value in
A collection of evenly sized bins.
is the lower edge of the first bin.
is the lower edge of the last bin.
A collection of evenly sized bins spaced to include the full range of
Return counts normalized so the sum of all values equals 1
Return the probability of each bin scaled so the peak is
Return the cumulative sum of all counts.
Each value is the number of counts in that bin plus all bins below it.
Return the cumulative probability histogram.
Each value is the fraction of counts in that bin plus all bins below it.
Calculate the linear regression from a collection of X/Y coordinates
Calculate the linear regression from a collection of X/Y coordinates
Calculate the linear regression a paired collection of X and Y points
Calculate the linear regression from a collection of evenly-spaced Y values
Return the Y point of the regression line for the given X position
Return the Y points of the regression line for the given X positions
Represents a Gaussian distribution of probabilities
for a normal distributed population.
Return a moving window average of the given data.
If original length is true, data will be padded with NaN.
Return a moving window standard deviation of the given data.
If original length is true, data will be padded with NaN.
T statistic
Degrees of freedom
Helper methods for setting fonts to all components of a plot
Helper methods for setting fonts to all components of a plot
Apply the given font name to all existing plot objects.
Also sets the default font name so this font will be used for plot objects added in the future.
Detects the best font to apply to every label in the plot based on the characters the they contain.
If the best font for a label cannot be detected, the font last defined by will be used.
Helper class to detect for duplicate items in complex collections
and display helpful error messages to the console the facilitate debugging.
Helper class to detect for duplicate items in complex collections
and display helpful error messages to the console the facilitate debugging.
Compare two raster images to identify and quantify differences
A plot control that renders in-memory and has
functionality useful for testing interactivity.
If assigned, this function will be used to create tick labels
This method attempts to find an ideal set of ticks.
If all labels fit within the bounds, the list of ticks is returned.
If a label doesn't fit in the bounds, the list is null and the size of the large tick label is returned.
The time unit to use for major ticks
The number of units between major ticks (e.g. major ticks every 7 s)
The time unit to use for minor ticks. If null, no minor ticks are generated.
The number of units between minor ticks.
An optional function to override where the intervals for ticks start. The DateTime argument provided is
the start range of the axis (i.e. ).
If omitted, the ticks will start from . This may have undesirable effects when zooming
and panning. If provided, the ticks will start from the returned DateTime.
If the plot contains weekly data, and it is desired to have ticks on the 1st of each month:
dt => new DateTime(dt.Year, dt.Month, 1);
If the plot contains hourly data, and it is desired to have ticks every 6 hours at 00:00, 6:00, 12:00, etc,
then set to , to 6, and provide the function:
dt => new DateTime(dt.Year, dt.Month, dt.Day);
If assigned, this function will be used to create tick labels
Creates a new generator.
The time unit to use for major ticks
The number of units between major ticks
The time unit to use for minor ticks. If null, no minor ticks are generated.
The number of units between minor ticks.
An optional function to override where the intervals for ticks start. The DateTime argument provided is
the start range of the axis (i.e. ).
Experimental tick generator designed for displaying financial time series data
where values are evenly spaced visually despite having DateTimes which may contain gaps.
Experimental tick generator designed for displaying financial time series data
where values are evenly spaced visually despite having DateTimes which may contain gaps.
An array of integers that serve as good divisors to subdivide this time unit
Returns the format string used to display tick labels of this time unit.
https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tostring
Return the DateTime N units relative to this one
Minimum span this time unit can represent.
To represent spans smaller than this, try the next smaller unit.
Return a given date "snapped" back to the nearest nice tick position.
Use this to find a good tick position for a given DateTime.
A collection of methods which contain logic for choosing how a value is representing with text
One value per half-edge, containing the point index of where a given half edge starts.
One value per half-edge, containing the opposite half-edge in the adjacent triangle, or -1 if there is no adjacent triangle
The initial points Delaunator was constructed with.
A list of point indices that traverses the hull of the points.
Delaunator triangulation is an efficient algorithm for computing the Delaunay triangulation of a set of points,
which connects points to form triangles with the property that no point lies inside the circumcircle of any triangle.
Returns the half-edges that share a start point with the given half edge, in order.
Returns the three point indices of a given triangle id.
Returns the triangle ids adjacent to the given triangle id.
Will return up to three values.
Returns the three half-edges of a given triangle id.
Returns the triangle id of a given half-edge.
Version formatted like "5.0.0-beta"
Version formatted like "ScottPlot 5.0.0-beta"
Throws an exception if this version of ScottPlot does not match the expected major version
Throws an exception if this version of ScottPlot does not match the expected major and minor versions
Throws an exception if this version of ScottPlot does not match the exact one given
Allows init-only setters in older .NET versions
Allows required members in older .NET versions
Allows required members in older .NET versions
Represent a type can be used to index a collection either from the start or the end.
Index is used by the C# compiler to support the new index syntax
int[] someArray = new int[5] { 1, 2, 3, 4, 5 } ;
int lastElement = someArray[^1]; // lastElement = 5
Construct an Index using a value and indicating if the index is from the start or from the end.
The index value. it has to be zero or positive number.
Indicating if the index is from the start or from the end.
If the Index constructed from the end, index value 1 means pointing at the last element and index value 0 means pointing at beyond last element.
Create an Index pointing at first element.
Create an Index pointing at beyond last element.
Create an Index from the start at the position indicated by the value.
The index value from the start.
Create an Index from the end at the position indicated by the value.
The index value from the end.
Returns the index value.
Indicates whether the index is from the start or the end.
Calculate the offset from the start using the giving collection length.
The length of the collection that the Index will be used with. length has to be a positive value
For performance reason, we don't validate the input length parameter and the returned offset value against negative values.
we don't validate either the returned offset is greater than the input length.
It is expected Index will be used with collections which always have non negative length/count. If the returned offset is negative and
then used to index a collection will get out of range exception which will be same affect as the validation.
Indicates whether the current Index object is equal to another object of the same type.
An object to compare with this object
Indicates whether the current Index object is equal to another Index object.
An object to compare with this object
Returns the hash code for this instance.
Converts integer number to an Index.
Converts the value of the current Index object to its equivalent string representation.