> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class Plot2d

Namespace: [OpenTD.Results.Plot](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/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.

```csharp theme={null}
public abstract class Plot2d
```

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[Plot2d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Plot.Plot2d.md)

#### Derived

[SimplePlot](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Plot.SimplePlot.md)

## Inherited Members

[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Constructors

### Plot2d(string)

```csharp theme={null}
public Plot2d(string title)
```

#### Parameters

`title` [string](https://learn.microsoft.com/dotnet/api/system.string)

### Plot2d()

```csharp theme={null}
public Plot2d()
```

## Properties

### AutoCommenter

```csharp theme={null}
protected AutoCommenter AutoCommenter { get; set; }
```

#### Property Value

AutoCommenter

### AutoNamer

```csharp theme={null}
protected AutoNamer AutoNamer { get; set; }
```

#### 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.

```csharp theme={null}
public double AutoScaleAxesMarginPercent { get; set; }
```

#### Property Value

[double](https://learn.microsoft.com/dotnet/api/system.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.

```csharp theme={null}
public bool AutoUseMarkersForNonContinuousSeries { get; set; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### Comment

```csharp theme={null}
public string Comment { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### InternalSuggestedComment

```csharp theme={null}
public string InternalSuggestedComment { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### InternalSuggestedName

```csharp theme={null}
public string InternalSuggestedName { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### Legend

```csharp theme={null}
public Legend Legend { get; set; }
```

#### Property Value

[Legend](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Plot.Legend.md)

### Name

```csharp theme={null}
public string Name { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### Plot2dStyle

```csharp theme={null}
public Plot2dStyle Plot2dStyle { get; set; }
```

#### Property Value

[Plot2dStyle](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Plot.Plot2dStyle.md)

### Series

```csharp theme={null}
public Series2dCollection Series { get; set; }
```

#### Property Value

[Series2dCollection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Plot.Series2dCollection.md)

### Title

```csharp theme={null}
public string Title { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.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.

```csharp theme={null}
public bool TryToNameYAxesBasedOnSeriesSubtype { get; set; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### XAxes

```csharp theme={null}
public List<Axis> XAxes { get; set; }
```

#### Property Value

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[Axis](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Plot.Axis.md)>

### YAxes

```csharp theme={null}
public List<Axis> YAxes { get; set; }
```

#### Property Value

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[Axis](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Plot.Axis.md)>

## Methods

### AddSeries(Series2d)

```csharp theme={null}
public void AddSeries(Series2d series)
```

#### Parameters

`series` [Series2d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Plot.Series2d.md)

### AddSeries(DataArray, DataArray)

```csharp theme={null}
public void AddSeries(DataArray xData, DataArray yData)
```

#### Parameters

`xData` [DataArray](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Dataset.DataArray.md)

`yData` [DataArray](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Dataset.DataArray.md)

### AddSeries(DataArray)

```csharp theme={null}
public void AddSeries(DataArray yData)
```

#### Parameters

`yData` [DataArray](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Dataset.DataArray.md)

### AddSeries(DataArrayCollection, bool)

```csharp theme={null}
public void AddSeries(DataArrayCollection dataCollection, bool useFirstArrayAsXData = false)
```

#### Parameters

`dataCollection` [DataArrayCollection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Dataset.DataArrayCollection.md)

`useFirstArrayAsXData` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### AddSeries(DataSubtype, IEnumerable\<double>, UnitsData, ItemIdentifier)

```csharp theme={null}
public void AddSeries(DataSubtype subtype, IEnumerable<double> values, UnitsData units = null, ItemIdentifier item = null)
```

#### Parameters

`subtype` [DataSubtype](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Dataset.DataSubtype.md)

`values` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<[double](https://learn.microsoft.com/dotnet/api/system.double)>

`units` UnitsData

`item` [ItemIdentifier](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Dataset.ItemIdentifier.md)

### AddSeries(IEnumerable\<double>)

```csharp theme={null}
public void AddSeries(IEnumerable<double> xData)
```

#### Parameters

`xData` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<[double](https://learn.microsoft.com/dotnet/api/system.double)>

### AutoNameXAxes()

```csharp theme={null}
public void AutoNameXAxes()
```

### AutoNameYAxesBasedOnSubtype()

```csharp theme={null}
public void AutoNameYAxesBasedOnSubtype()
```

### AutoScaleAxes()

Scales each axis based on the series attached to it.

```csharp theme={null}
public void AutoScaleAxes()
```

#### Exceptions

OpenTDException

AutoScaleNumIntervals must be positive.

### AutoSetAxes()

Makes sure each series is assigned to an axis with the correct dimension.
Throws away unused axes.

```csharp theme={null}
public void AutoSetAxes()
```

### AutoSetLegend()

```csharp theme={null}
protected void AutoSetLegend()
```

### AutoSetMarkers()

```csharp theme={null}
public void AutoSetMarkers()
```

### GetAsImage()

```csharp theme={null}
public virtual Bitmap GetAsImage()
```

#### Returns

[Bitmap](https://learn.microsoft.com/dotnet/api/system.drawing.bitmap)

### GetAsTable(string, bool)

```csharp theme={null}
public string GetAsTable(string delimiter = ",", bool consolidateXData = true)
```

#### Parameters

`delimiter` [string](https://learn.microsoft.com/dotnet/api/system.string)

`consolidateXData` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

### GetPlotStyle()

```csharp theme={null}
public Plot2dStyle GetPlotStyle()
```

#### Returns

[Plot2dStyle](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Plot.Plot2dStyle.md)

### GetReadyToOutput()

```csharp theme={null}
protected virtual void GetReadyToOutput()
```

### GetSelfSuggestedComment()

```csharp theme={null}
protected virtual string GetSelfSuggestedComment()
```

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

### GetSelfSuggestedName()

```csharp theme={null}
protected virtual string GetSelfSuggestedName()
```

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

### GetSeriesOnAxis(Axis)

```csharp theme={null}
public List<Series2d> GetSeriesOnAxis(Axis a)
```

#### Parameters

`a` [Axis](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Plot.Axis.md)

#### Returns

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[Series2d](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Plot.Series2d.md)>

### SaveAsImage(string)

```csharp theme={null}
public void SaveAsImage(string pathname)
```

#### Parameters

`pathname` [string](https://learn.microsoft.com/dotnet/api/system.string)

### SaveAsTable(string, string, bool)

Saves the plot as a tabular data.

```csharp theme={null}
public void SaveAsTable(string pathname, string delimiter = ",", bool consolidateXData = true)
```

#### Parameters

`pathname` [string](https://learn.microsoft.com/dotnet/api/system.string)

The output pathname.

`delimiter` [string](https://learn.microsoft.com/dotnet/api/system.string)

The column delimiter.

`consolidateXData` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

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)

```csharp theme={null}
public void SetPlotStyle(Plot2dStyle ps)
```

#### Parameters

`ps` [Plot2dStyle](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Plot.Plot2dStyle.md)

### SetSeriesPaletteColor(int, Color)

```csharp theme={null}
public void SetSeriesPaletteColor(int index, Color color)
```

#### Parameters

`index` [int](https://learn.microsoft.com/dotnet/api/system.int32)

`color` [Color](https://learn.microsoft.com/dotnet/api/system.drawing.color)

### Show()

```csharp theme={null}
public virtual void Show()
```

### ToString()

Returns a string that represents the current object.

```csharp theme={null}
public override string ToString()
```

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

A string that represents the current object.

## See Also

[SimplePlot](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Plot.SimplePlot.md),
IAutoName
