Skip to main content
Namespace: OpenTD.Results.Plot
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 ← Plot2d

Derived

SimplePlot

Inherited 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

AutoCommenter

AutoNamer

Property Value

AutoNamer

AutoScaleAxesMarginPercent

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

double

AutoUseMarkersForNonContinuousSeries

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

bool

Comment

Property Value

string

InternalSuggestedComment

Property Value

string

InternalSuggestedName

Property Value

string

Legend

Property Value

Legend

Name

Property Value

string

Plot2dStyle

Property Value

Plot2dStyle

Series

Property Value

Series2dCollection

Title

Property Value

string

TryToNameYAxesBasedOnSeriesSubtype

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

bool

XAxes

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

Bitmap

GetAsTable(string, bool)

Parameters

delimiter string consolidateXData bool

Returns

string

GetPlotStyle()

Returns

Plot2dStyle

GetReadyToOutput()

GetSelfSuggestedComment()

Returns

string

GetSelfSuggestedName()

Returns

string

GetSeriesOnAxis(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

Show()

ToString()

Returns a string that represents the current object.

Returns

string A string that represents the current object.

See Also

SimplePlot, IAutoName