ScottPlot
|
Public Member Functions | |||||||
Plot () | |||||||
void | Dispose () | ||||||
Pixel | GetPixel (Coordinates coordinates) | ||||||
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. | |||||||
Pixel | GetPixel (Coordinates coordinates, IXAxis xAxis, IYAxis yAxis) | ||||||
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. | |||||||
Coordinates | GetCoordinates (Pixel pixel, IXAxis? xAxis=null, IYAxis? yAxis=null) | ||||||
Return the coordinate for a specific pixel using measurements from the most recent render. | |||||||
Coordinates | GetCoordinates (float x, float y, IXAxis? xAxis=null, IYAxis? yAxis=null) | ||||||
Return the coordinate for a specific pixel using measurements from the most recent render. | |||||||
CoordinateRect | GetCoordinateRect (float x, float y, float radius=10, IXAxis? xAxis=null, IYAxis? yAxis=null) | ||||||
Return a coordinate rectangle centered at a pixel. Uses measurements from the most recent render.
| |||||||
CoordinateRect | GetCoordinateRect (Pixel pixel, float radius=10, IXAxis? xAxis=null, IYAxis? yAxis=null) | ||||||
Return a coordinate rectangle centered at a pixel. Uses measurements from the most recent render.
| |||||||
CoordinateRect | GetCoordinateRect (Coordinates coordinates, float radius=10, IXAxis? xAxis=null, IYAxis? yAxis=null) | ||||||
Return a coordinate rectangle centered at a coordinate pair with the radius specified in pixels. Uses measurements from the most recent render.
| |||||||
IAxis? | GetAxis (Pixel pixel) | ||||||
Get the axis under a given pixel. | |||||||
IPanel? | GetPanel (Pixel pixel, bool axesOnly) | ||||||
Get the panel under a given pixel. | |||||||
void | Render (int width=400, int height=300) | ||||||
void | RenderInMemory (int width=400, int height=300) | ||||||
Create a new image of the given dimensions, render the plot onto it, and return it. | |||||||
void | Render (SKCanvas canvas, int width, int height) | ||||||
Render onto an existing canvas with the given dimensions. | |||||||
void | Render (SKCanvas canvas, PixelRect rect) | ||||||
Render onto an existing canvas inside the given rectangle. | |||||||
void | Render (SKSurface surface) | ||||||
Render onto an existing canvas of a surface over the local clip bounds. | |||||||
Image | GetImage (int width, int height) | ||||||
string | GetImageHtml (int width, int height) | ||||||
string | GetPngHtml (int width, int height, string classContent="", string styleContent="") | ||||||
Render the plot and return an HTML img element containing a Base64-encoded PNG. | |||||||
string | GetSvgHtml (int width, int height) | ||||||
Render the plot and return a plain text SVG element suitable for insertion into HTML. | |||||||
SavedImageInfo | SaveJpeg (string filePath, int width, int height, int quality=85) | ||||||
SavedImageInfo | SavePng (string filePath, int width, int height) | ||||||
SavedImageInfo | SaveBmp (string filePath, int width, int height) | ||||||
SavedImageInfo | SaveWebp (string filePath, int width, int height, int quality=85) | ||||||
SavedImageInfo | SaveSvg (string filePath, int width, int height) | ||||||
string | GetSvgXml (int width, int height) | ||||||
SavedImageInfo | Save (string filePath, int width, int height) | ||||||
SavedImageInfo | Save (string filePath, int width, int height, ImageFormat format, int quality=85) | ||||||
byte[] | GetImageBytes (int width, int height, ImageFormat format=ImageFormat.Bmp) | ||||||
Image | GetLegendImage () | ||||||
Returns the content of the legend as a raster image. | |||||||
string | GetLegendSvgXml () | ||||||
Returns the content of the legend as SVG (vector) image. | |||||||
IEnumerable< IPlottable > | GetPlottables () | ||||||
Return contents of PlottableList. | |||||||
IEnumerable< T > | GetPlottables< T > () | ||||||
Return all plottables in PlottableList of the given type. | |||||||
void | Remove (IPlottable plottable) | ||||||
Remove the given plottable from the PlottableList. | |||||||
void | Remove (IPanel panel) | ||||||
Remove the given Panel from the Axes. | |||||||
void | Remove (IAxis axis) | ||||||
Remove the given Axis from the Axes. | |||||||
void | Remove (Type plotType) | ||||||
Remove all items of a specific type from the PlottableList. | |||||||
void | Remove< T > () | ||||||
Remove a all instances of a specific type from the PlottableList. | |||||||
void | Remove< T > (Func< T, bool > predicate) | ||||||
Remove all instances of a specific type from the PlottableList that meet the predicate criteraia. | |||||||
void | MoveToTop (IPlottable plottable) | ||||||
Move the indicated plottable to the end of the list so it is rendered last and appears above all other plottables. | |||||||
void | MoveToBottom (IPlottable plottable) | ||||||
Move the indicated plottable to the start of the list so it is rendered first and appears below all other plottables. | |||||||
void | MoveToFront (IPlottable plottable) | ||||||
Move the indicated plottable to the end of the list so it is rendered last. | |||||||
void | MoveToBack (IPlottable plottable) | ||||||
Move the indicated plottable to the start of the list so it is rendered first. | |||||||
void | HideAxesAndGrid (bool showTitle=true) | ||||||
Disable visibility for all axes and grids. | |||||||
void | HideGrid () | ||||||
Disable visibility for all grids. | |||||||
void | ShowGrid () | ||||||
Enable visibility for all grids. | |||||||
Legend | ShowLegend () | ||||||
Helper method for setting visibility of the Legend | |||||||
Legend | ShowLegend (Alignment alignment) | ||||||
Helper method for setting visibility of the Legend and setting Legend.Location to the provided one. | |||||||
Legend | ShowLegend (Alignment alignment, Orientation orientation) | ||||||
Helper method for setting the Legend's IsVisible, Alignment, and Orientation properties all at once. | |||||||
Legend | ShowLegend (IEnumerable< LegendItem > items, Alignment location=Alignment.LowerRight) | ||||||
Helper method for displaying specific items in the legend. | |||||||
Panels.LegendPanel | ShowLegend (Edge edge) | ||||||
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. | |||||||
Legend | HideLegend () | ||||||
Helper method for setting visibility of the Legend | |||||||
void | Clear () | ||||||
Clears the PlottableList list. | |||||||
void | Clear< T > () | ||||||
Clear a all instances of a specific type from the PlottableList. | |||||||
void | Title (string text, float? size=null) | ||||||
Shortcut to set text of the TitlePanel Label. Assign properties of TitlePanel Label to customize size, color, font, etc. | |||||||
void | XLabel (string label, float? size=null) | ||||||
Shortcut to set text of the BottomAxis Label Assign properties of BottomAxis Label to customize size, color, font, etc. | |||||||
void | YLabel (string label, float? size=null) | ||||||
Shortcut to set text of the BottomAxis Label Assign properties of BottomAxis Label to customize size, color, font, etc. | |||||||
PlotStyle | GetStyle () | ||||||
Return the current style settings for this plot. | |||||||
void | SetStyle (PlotStyle style) | ||||||
Apply the given style settings to this plot. | |||||||
void | SetStyle (Plot otherPlot) | ||||||
Apply the style settings from the given plot to this plot. | |||||||
void | Developer_ShowAxisDetails (bool enable=true) | ||||||
Static Public Member Functions | |
static DefaultGrid | GetDefaultGrid () |
Public Attributes | |
BackgroundStyle | FigureBackground = new() { Color = Colors.White } |
Style for the background of the entire figure. | |
BackgroundStyle | DataBackground = new() { Color = Colors.Transparent } |
Style for the data area (the area within the axis frames) | |
Properties | |
List< IPlottable > | PlottableList = [] [get] |
PlottableAdder | Add [get] |
RenderManager | RenderManager [get] |
RenderDetails | LastRender [get] |
LayoutManager | Layout [get] |
IZoomRectangle | ZoomRectangle [get, set] |
double | ScaleFactor [get, set] |
AxisManager | Axes [get] |
PlotStyler | Style = new() [get] |
FontStyler | Font [get] |
Legend | Legend [get, set] |
DefaultGrid | Grid [get] |
IPlottable | Benchmark = new Plottables.Benchmark() [get, set] |
object | Sync = new() [get] |
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. | |
IPlotControl? | PlotControl = null [get, set] |
In GUI environments this property holds a reference to the interactive plot control. | |
|
inline |
void ScottPlot.Plot.Clear | ( | ) |
Clears the PlottableList list.
|
inline |
Clear a all instances of a specific type from the PlottableList.
T | Type of IPlottable to be cleared |
T | : | IPlottable |
|
inline |
|
inline |
Get the axis under a given pixel.
pixel | Point |
|
inline |
Return a coordinate rectangle centered at a coordinate pair with the radius specified in pixels. Uses measurements from the most recent render.
coordinates | Center point in coordinate units |
radius | Radius in pixels |
|
inline |
Return a coordinate rectangle centered at a pixel. Uses measurements from the most recent render.
x | Center point pixel's x |
y | Center point pixel's y |
radius | Radius in pixels |
|
inline |
Return a coordinate rectangle centered at a pixel. Uses measurements from the most recent render.
pixel | Center point pixel |
radius | Radius in pixels |
|
inline |
Return the coordinate for a specific pixel using measurements from the most recent render.
|
inline |
Return the coordinate for a specific pixel using measurements from the most recent render.
|
static |
|
inline |
|
inline |
|
inline |
Image ScottPlot.Plot.GetLegendImage | ( | ) |
Returns the content of the legend as a raster image.
string ScottPlot.Plot.GetLegendSvgXml | ( | ) |
Returns the content of the legend as SVG (vector) image.
Get the panel under a given pixel.
pixel | Point |
Pixel ScottPlot.Plot.GetPixel | ( | Coordinates | coordinates | ) |
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.
|
inline |
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.
|
inline |
Return contents of PlottableList.
|
inline |
Return all plottables in PlottableList of the given type.
T | : | IPlottable |
|
inline |
Render the plot and return an HTML img element containing a Base64-encoded PNG.
PlotStyle ScottPlot.Plot.GetStyle | ( | ) |
Return the current style settings for this plot.
|
inline |
Render the plot and return a plain text SVG element suitable for insertion into HTML.
|
inline |
|
inline |
Disable visibility for all axes and grids.
|
inline |
Disable visibility for all grids.
|
inline |
Helper method for setting visibility of the Legend
|
inline |
Move the indicated plottable to the start of the list so it is rendered first.
void ScottPlot.Plot.MoveToBottom | ( | IPlottable | plottable | ) |
Move the indicated plottable to the start of the list so it is rendered first and appears below all other plottables.
|
inline |
Move the indicated plottable to the end of the list so it is rendered last.
void ScottPlot.Plot.MoveToTop | ( | IPlottable | plottable | ) |
Move the indicated plottable to the end of the list so it is rendered last and appears above all other plottables.
|
inline |
Remove the given Axis from the Axes.
|
inline |
Remove the given Panel from the Axes.
|
inline |
Remove the given plottable from the PlottableList.
|
inline |
Remove all items of a specific type from the PlottableList.
|
inline |
Remove a all instances of a specific type from the PlottableList.
T | Type of IPlottable to be removed |
T | : | IPlottable |
|
inline |
Remove all instances of a specific type from the PlottableList that meet the predicate criteraia.
predicate | A function to test each element for a condition. |
T | Type of IPlottable to be removed |
T | : | IPlottable |
|
inline |
|
inline |
Render onto an existing canvas with the given dimensions.
|
inline |
Render onto an existing canvas inside the given rectangle.
|
inline |
Render onto an existing canvas of a surface over the local clip bounds.
void ScottPlot.Plot.RenderInMemory | ( | int | width = 400 , |
int | height = 300 |
||
) |
Create a new image of the given dimensions, render the plot onto it, and return it.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void ScottPlot.Plot.SetStyle | ( | Plot | otherPlot | ) |
Apply the style settings from the given plot to this plot.
void ScottPlot.Plot.SetStyle | ( | PlotStyle | style | ) |
Apply the given style settings to this plot.
|
inline |
Enable visibility for all grids.
|
inline |
Helper method for setting visibility of the Legend
Helper method for setting visibility of the Legend and setting Legend.Location to the provided one.
|
inline |
Helper method for setting the Legend's IsVisible, Alignment, and Orientation properties all at once.
|
inline |
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.
|
inline |
Helper method for displaying specific items in the legend.
|
inline |
Shortcut to set text of the TitlePanel Label. Assign properties of TitlePanel Label to customize size, color, font, etc.
|
inline |
Shortcut to set text of the BottomAxis Label Assign properties of BottomAxis Label to customize size, color, font, etc.
|
inline |
Shortcut to set text of the BottomAxis Label Assign properties of BottomAxis Label to customize size, color, font, etc.
BackgroundStyle ScottPlot.Plot.DataBackground = new() { Color = Colors.Transparent } |
Style for the data area (the area within the axis frames)
BackgroundStyle ScottPlot.Plot.FigureBackground = new() { Color = Colors.White } |
Style for the background of the entire figure.
|
get |
|
get |
|
getset |
|
get |
|
get |
|
get |
|
get |
|
getset |
|
getset |
In GUI environments this property holds a reference to the interactive plot control.
|
get |
|
get |
|
getset |
|
get |
|
get |
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.
|
getset |