Assembly: OpenTD.Results.dll An abstract class representing a 2d plot. Inherit from it to take advantage of its many helpful features, such as auto-naming, auto-creating and scaling axes, etc. SimplePlot is a concrete definition of a Plot2d that uses the .NET charting tools. There are methods to display the plot on the screen, save it as a bitmap, and to output it as a table of data.
Inheritance
object ← Plot2dDerived
SimplePlotInherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()Constructors
Plot2d(string)
Parameters
title string
Plot2d()
Properties
AutoCommenter
Property Value
AutoCommenterAutoNamer
Property Value
AutoNamerAutoScaleAxesMarginPercent
For axes that are autoscaled, this is the amount that each axis will be grown beyond the range of the data, as a percentage of the total range. Exceptions: if the minimum value of the data is 0, autoscaling will not extend the minimum value of the axis below 0. If the axis is for Record Numbers, autoscaling won’t extend the minimum value of the axis below the first record number.Property Value
doubleAutoUseMarkersForNonContinuousSeries
If true, series that are detected to be non-continuous (because one or more y-values is NaN, for example) will have markers turned on automatically, to help spot orphaned points or small curve segments. This also applies to series with just one point.Property Value
boolComment
Property Value
stringInternalSuggestedComment
Property Value
stringInternalSuggestedName
Property Value
stringLegend
Property Value
LegendName
Property Value
stringPlot2dStyle
Property Value
Plot2dStyleSeries
Property Value
Series2dCollectionTitle
Property Value
stringTryToNameYAxesBasedOnSeriesSubtype
Normally, Y axes are named based on their dimension, e.g., “Temperature”. If this member is true, the plot will attempt to name them based on the subtype of the series applied to them, e.g., “Node Temperature” or “Lump Temperature”. Defaults to false.Property Value
boolXAxes
Property Value
List<Axis>YAxes
Property Value
List<Axis>Methods
AddSeries(Series2d)
Parameters
series Series2d
AddSeries(DataArray, DataArray)
Parameters
xData DataArray
yData DataArray
AddSeries(DataArray)
Parameters
yData DataArray
AddSeries(DataArrayCollection, bool)
Parameters
dataCollection DataArrayCollection
useFirstArrayAsXData bool
AddSeries(DataSubtype, IEnumerable<double>, UnitsData, ItemIdentifier)
Parameters
subtype DataSubtype
values IEnumerable<double>
units UnitsData
item ItemIdentifier
AddSeries(IEnumerable<double>)
Parameters
xData IEnumerable<double>
AutoNameXAxes()
AutoNameYAxesBasedOnSubtype()
AutoScaleAxes()
Scales each axis based on the series attached to it.Exceptions
OpenTDException AutoScaleNumIntervals must be positive.AutoSetAxes()
Makes sure each series is assigned to an axis with the correct dimension. Throws away unused axes.AutoSetLegend()
AutoSetMarkers()
GetAsImage()
Returns
BitmapGetAsTable(string, bool)
Parameters
delimiter string
consolidateXData bool
Returns
stringGetPlotStyle()
Returns
Plot2dStyleGetReadyToOutput()
GetSelfSuggestedComment()
Returns
stringGetSelfSuggestedName()
Returns
stringGetSeriesOnAxis(Axis)
Parameters
a Axis
Returns
List<Series2d>SaveAsImage(string)
Parameters
pathname string
SaveAsTable(string, string, bool)
Saves the plot as a tabular data.Parameters
pathname string
The output pathname.
delimiter string
The column delimiter.
consolidateXData bool
if set to true, Will attempt to combine series x-values into the fewest possible
columns. Will only combine x-values if they point to exactly the same source, i.e., it
tests equality by reference, not by value.
SetPlotStyle(Plot2dStyle)
Parameters
ps Plot2dStyle
SetSeriesPaletteColor(int, Color)
Parameters
index int
color Color