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

# Plot classes

## `PlotContainer` classes

### `PlotDataDict`class

#### *class* compolyx.plot\_data.PlotDataDict(name, label=None, obj=None, list=\[], item\_type=\<class 'object'>, parent=None, key\_attr='name')

#### copy\_plot(source)

Copy a plot object.

* **Parameters:**
  * **source**: Plot object to be copied.
* **Returns:**
  Object of the plot duplicate.

**Examples:**
Make a copy of the thickness plot “My\_Thickness\_Plot”:

```python theme={null}
>>> plot_copy = db.active_model.layup_plots.copy_plot( db.active_model.layup_plots['My_Thickness_Plot'] )
```

### `LayupPlotDict` class

#### *class* compolyx.plot\_data.LayupPlotDict(name, label=None, obj=None, list=\[], item\_type=\<class 'object'>, parent=None, key\_attr='name')

Container for layup plots.

#### create\_angle\_plot(name=None, id=None, scope\_entire\_model=True, data\_scope=\[], show\_on\_solids=False, show\_on\_section\_cuts=True, show\_ply\_offsets=False, ply\_offset\_scale\_factor=1.0, component=None, add\_to\_active\_set=True, locked=False)

Create an angle plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
  * **scope\_entire\_model**: If `True`, then the scope of this plot is the entire model. If not, then set to `False` and use the **data\_scope** to specify a subscope.
  * **data\_scope**: Object(s) defining the scope for which data is computed and returned. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
    * Sampling Point
  * **show\_on\_solids**: `True` or `False` (default). Whether to show the results on the shell or solid model (if present).
  * **show\_on\_section\_cuts**: Whether to show the results on the surface section cuts as well. Default is `True`.
  * **show\_ply\_offsets**: `True` or `False` (default). Whether to display ply-wise visualizations with ply offsets.
  * **ply\_offset\_scale\_factor**: Scale factor for the offsets of the visualized plies if **show\_ply\_offsets** = `True`.
* **Returns:**
  The plot object.

**Example:**
Create a angle plot with Data Scope set to Element Set “All\_Elements”:

```python theme={null}
>>> angle_plot = db.active_model.layup_plots.create_angle_plot(self, name="MyPlot", data_scope=db.active_model.element_sets['All_Elements'])
```

#### create\_draping\_plot(name=None, id=None, show\_flatwrap=True, show\_draping\_mesh=True, add\_to\_active\_set=True, locked=False)

Create a draping plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
* **Returns:**
  The plot object.

**Example:**
Create a draping plot with Data Scope set to Element Set “All\_Elements”:

```python theme={null}
>>> draping_plot = db.active_model.layup_plots.create_draping_plot(self, name="MyPlot")
```

#### create\_field\_definition\_plot(name=None, id=None, scope\_entire\_model=True, data\_scope=\[], field\_variable\_name=None, show\_on\_solids=False, add\_to\_active\_set=True, locked=False)

Create a field definition plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
  * **scope\_entire\_model**: If `True`, then the scope of this plot is the entire model. If not, then set to `False` and use the **data\_scope** to specify a subscope.
  * **data\_scope**: Object(s) defining the scope for which data is computed and returned. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
  * **show\_on\_solids**: `True` or `False` (default). Whether to show the results on the shell or solid model (if present).
* **Returns:**
  The plot object.

**Example:**
Create a field definition plot for field degradation with Data Scope set to Element Set “All\_Elements” in ply\_wise mode:

```python theme={null}
>>> field_plot = db.active_model.layup_plots.create_field_definition_plot(self, name="MyPlot", field_variable_name="degradation", data_scope=db.active_model.element_sets['All_Elements'], ply_wise = True)
```

#### create\_layup\_mapping\_plot(name=None, id=None, data\_scope=\[], ply\_wise=True, add\_to\_active\_set=True, locked=False, component=None, show\_on\_solids=True, active=True)

Create a layup mapping plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
  * **data\_scope**: Object(s) defining the scope for which data is computed and returned. Option(s):
    * Imported Solid Model
  * **ply\_wise**: `True` or `False` (default). Decides whether to return the thickness of the individual plies or of the whole stack of plies present at an element.
  * **show\_on\_solids**: `True` or `False` (default). Whether to show the results on the shell or solid model (if present).
  * **component**: Specifies the active component.
  * **show\_on\_solids**: Whether to show the values of the solid element.
  * **active**: Whether the plot is active.
* **Returns:**
  The plot object.

**Example:**
Create a thickness plot with Data Scope set to Element Set “All\_Elements” in ply\_wise mode:

```python theme={null}
>>> thick_plot = db.active_model.layup_plots.create_layup_mapping_plot(self, name="MyPlot", data_scope=[db.active_model.solid_models['ImportedSolidModel'], ply_wise = True)
```

#### create\_material\_plot(name=None, id=None, active=True, scope\_entire\_model=True, data\_scope=\[], show\_on\_solids=False, show\_ply\_offsets=False, ply\_offset\_scale\_factor=1.0, add\_to\_active\_set=True, locked=False, component='E1', use\_all\_available\_fields=True, field\_variable\_names=\[], shear\_angle\_enabled=False, temperature\_enabled=False)

Create a material plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
  * **active**: Whether the plot is active.
  * **scope\_entire\_model**: If `True`, then the scope of this plot is the entire model. If not, then set to `False` and use the **data\_scope** to specify a subscope.
  * **data\_scope**: Object(s) defining the scope for which data is computed and returned. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
    * Sampling Point
  * **show\_on\_solids**: `True` or `False` (default). Whether to show the results on the shell or solid model (if present).
  * **show\_ply\_offsets**: `True` or `False` (default). Whether to display ply-wise visualizations with ply offsets.
  * **ply\_offset\_scale\_factor**: Scale factor for the offsets of the visualized plies if **show\_ply\_offsets** = `True`.
  * **component**: Specifies the component.
  * **use\_all\_available\_fields**: `True` (default) or `False`. Whether to enable all available field variables in the evaluation.
* **Returns:**
  The plot object.

**Example:**
Create a material plot with Data Scope set to Element Set “All\_Elements” showing the Young Modulus E2:

```python theme={null}
>>> E2_plot = db.active_model.layup_plots.create_material_plot(name="E2_Plot", data_scope=[db.active_model.element_sets['All_Elements']], component = 'E2')
```

#### create\_scalar\_field\_plot(name=None, id=None, scope\_entire\_model=True, data\_scope=\[], scalar\_field=None, show\_supporting\_points=False, show\_supporting\_point\_labels=False, supporting\_point\_scale\_factor=1.0, show\_on\_solids=False, show\_ply\_offsets=False, ply\_offset\_scale\_factor=1.0, add\_to\_active\_set=True, locked=False)

Create a field plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
  * **scope\_entire\_model**: If `True`, then the scope of this plot is the entire model. If not, then set to `False` and use the **data\_scope** to specify a subscope.
  * **data\_scope**: Object(s) defining the scope for which data is computed and returned. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
    * Sampling Point.
  * **ply\_wise**: `True` or `False` (default). Decides whether to return the field values of the individual plies or of the whole stack of plies present at an element.
  * **show\_on\_solids**: `True` or `False` (default). Whether to show the results on the shell or solid model (if present).
  * **show\_ply\_offsets**: `True` or `False` (default). Whether to display ply-wise visualizations with ply offsets.
  * **ply\_offset\_scale\_factor**: Scale factor for the offsets of the visualized plies if **show\_ply\_offsets** = `True`.
* **Returns:**
  The plot object.

#### create\_thickness\_plot(name=None, id=None, scope\_entire\_model=True, data\_scope=\[], ply\_wise=False, show\_on\_solids=False, show\_ply\_offsets=False, ply\_offset\_scale\_factor=1.0, add\_to\_active\_set=True, locked=False, component='thickness')

Create a thickness plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
  * **scope\_entire\_model**: If `true`, then the scope of this plot is the entire model. If not, then set to `false` and use the **data\_scope** to specify a subscope.
  * **data\_scope**: Object(s) defining the scope for which data is computed and returned. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
    * Sampling Point
  * **ply\_wise**: `True` or `False` (default). Decides whether to return the thickness of the individual plies or of the whole stack of plies present at an element.
  * **show\_on\_solids**: `True` or `False` (default). Whether to show the results on the shell or solid model (if present).
  * **show\_ply\_offsets**: `True` or `False` (default). Whether to display ply-wise visualizations with ply offsets.
  * **ply\_offset\_scale\_factor**: Scale factor for the offsets of the visualized plies if **show\_ply\_offsets** = `True`.
  * **component**: Specifies the component.
* **Returns:**
  The plot object.

**Example:**
Create a thickness plot with Data Scope set to Element Set “All\_Elements” in ply\_wise mode:

```python theme={null}
>>> thick_plot = db.active_model.layup_plots.create_thickness_plot(self, name="MyPlot", data_scope=db.active_model.element_sets['All_Elements'], ply_wise = True)
```

#### create\_user\_defined\_plot(name=None, id=None, active=True, scope\_entire\_model=True, data\_scope=\[], user\_data=\[], user\_text=\[], user\_script=None, user\_script\_enabled=False, show\_on\_solids=False, show\_user\_text=False, text\_threshold=0.0, text\_threshold\_type='show\_all', show\_ply\_offsets=False, ply\_offset\_scale\_factor=1.0, add\_to\_active\_set=True, locked=False)

Create a user-defined plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
  * **active**: Whether the plot is active.
  * **scope\_entire\_model**: If `true`, then the scope of this plot is the entire model. If not, then set to `false` and use the **data\_scope** to specify a subscope.
  * **data\_scope**: Object(s) defining the scope for which data is computed and returned. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
    * Sampling Point
  * **user\_data**: Retrieve or provide the user data, which must obey the order of the `user_element_indices` or `user_element_labels`, respectively.
  * **user\_text**: Access to the user-defined text of the plot. Empty strings can be inserted when no labels are to be shown for certain elements.
  * **user\_script**: The body of the script to be executed on update if **user\_script\_enabled** = `True`.
  * **user\_script\_enabled**: Boolean that controls if a custom script is run on update.
  * **show\_on\_solids**: `True` or `False` (default). Whether to show the results on the shell or solid model (if present).
  * **show\_user\_text**: `True` or `False` (default). Whether to show the text, which the user provided.
  * **text\_threshold\_type**: Threshold can be set using the **text\_threshold** property. Options:
    * `show_all` (default)
    * `show_only_values_above_threshold`
    * `show_only_values_below_threshold`
  * **text\_threshold**: Threshold used for showing text if **text\_threshold\_type** is not `show_all`.
  * **show\_ply\_offsets**: `True` or `False` (default). Whether to display ply-wise visualizations with ply offsets.
  * **ply\_offset\_scale\_factor**: Scale factor for the offsets of the visualized plies if **show\_ply\_offsets** = `True`.
* **Returns:**
  The plot object.

**Example:**
Create a user-defined plot with Data Scope set to Element Set “All\_Elements”:

```python theme={null}
>>> u_plot = db.active_model.layup_plots.create_user_defined_plot(self, name="MyPlot", data_scope=db.active_model.element_sets['All_Elements'])
```

### `PostProcessingPlotDict` class

#### *class* compolyx.plot\_data.PostProcessingPlotDict(name, label=None, obj=None, list=\[], item\_type=\<class 'object'>, parent=None, key\_attr='name')

Container for postprocessing plots.

#### create\_deformation\_contour\_plot(name=None, id=None, active=True, scope\_entire\_model=True, data\_scope=\[], component=None, spot=None, ply\_wise=False, show\_on\_solids=False, solution\_set=-1)

Create a deformation plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
  * **active**: Whether the plot is active.
  * **scope\_entire\_model**: If `true`, then the scope of this plot is the entire model. If not, then set to `false` and use the **data\_scope** to specify a subscope.
  * **data\_scope**: Object(s) defining the scope for which data is computed and returned. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
    * Sampling Point
  * **component**: `x`, `y`, `z`, `rotx`, `roty`, `rotz`, or `usum`.
  * **show\_on\_solids**: `True` or `False` (default). Whether to show the results on the shell or solid model (if present).
  * **solution\_set**: Selection of the solution set.
* **Returns:**
  The plot object.

**Example:**
Create a deformation plot with Data Scope set to Element Set `All_Elements` for `rotx`:

```python theme={null}
>>> defo_plot = db.active_model.solutions['Solution.1'].plots.create_deformation_contour_plot(self, name="MyPlot", data_scope=db.active_model.element_sets['All_Elements'], component = 'rotx')
```

#### create\_failure\_plot(name=None, id=None, active=True, scope\_entire\_model=True, data\_scope=\[], component=None, spot=None, ply\_wise=False, show\_on\_solids=False, show\_critical\_failure\_mode=True, show\_critical\_layer=False, show\_critical\_load\_case=False, text\_threshold=0.0, text\_threshold\_auto=True, failure\_criteria\_definition=None, show\_ply\_offsets=False, ply\_offset\_scale\_factor=1.0, solution\_set=-1)

Create a failure criterion plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
  * **active**: Whether the plot is active.
  * **scope\_entire\_model**: If `true`, then the scope of this plot is the entire model. If not, then set to `false` and use the **data\_scope** to specify a subscope.
  * **data\_scope**: Object(s) defining the scope for which data is computed and returned. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
    * Sampling Point
  * **component**: `irf`, `mos`, or `rf`, which are Inverse Reserve Factor, Margin of Safety, and Reserve Factor.
  * **ply\_wise**: `True` or `False` (default). Decides whether to evaluate for individual plies or pick the most critical ply per element.
  * **show\_on\_solids**: `True` or `False` (default). Whether to show the results on the shell or solid model (if present).
  * **show\_critical\_failure\_mode**: `True` (default) or `False`. Whether to show the text, which indicates the mode of failure.
  * **show\_critical\_layer**: `True` or `False` (default). Whether to show the text, which indicates the number of the failing ply (only if **ply\_wise** = `False`).
  * **show\_critical\_load\_case**: `True` or `False` (default). Whether to show the text, which indicates the load case for which failure is predicted (only for Envelope Solutions).
  * **text\_threshold**: Threshold value above/below which text for an element is hidden. This helps to declutter the text plot.
  * **text\_threshold\_auto**: `True` (default) or `False`. If True, suggested text\_thersold values are used.
  * **failure\_criteria\_definition**: Object of the failure criterion definition to be used for this plot.
  * **show\_ply\_offsets**: `True` or `False` (default). Whether to display ply-wise visualizations with ply offsets.
  * **ply\_offset\_scale\_factor**: Scale factor for the offsets of the visualized plies if **show\_ply\_offsets** = `True`.
  * **solution\_set**: Selection of the solution set.
* **Returns:**
  The plot object.

**Example:**
Create a failure criterion plot with Data Scope set to Element Set `All_Elements`, showing the inverse reserve factor with the most critical layer per element for failure criterion `MyFC`, and not showing any text.

```python theme={null}
>>> fc_plot = db.active_model.solutions['Solution.1'].plots.create_failure_plot(self, name="MyPlot", data_scope=db.active_model.element_sets['All_Elements'], component = 'irf', ply_wise = False, show_critical_failure_mode = False, failure_criteria_definition = db.active_model.definitions['MyFC'])
```

#### create\_material\_plot(name=None, id=None, active=True, scope\_entire\_model=True, data\_scope=\[], show\_on\_solids=False, show\_ply\_offsets=False, ply\_offset\_scale\_factor=1.0, add\_to\_active\_set=True, locked=False, component='E1', use\_all\_available\_fields=True, field\_variable\_names=\[], shear\_angle\_enabled=False, temperature\_enabled=False, solution\_set=-1)

Create a material plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
  * **active**: Whether the plot is active.
  * **scope\_entire\_model**: If `true`, then the scope of this plot is the entire model. If not, then set to `false` and use the **data\_scope** to specify a subscope.
  * **data\_scope**: Object(s) defining the scope for which data is computed and returned. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
    * Sampling Point
  * **show\_on\_solids**: `True` or `False` (default). Whether to show the results on the shell or solid model (if present).
  * **show\_ply\_offsets**: `True` or `False` (default). Whether to display ply-wise visualizations with ply offsets.
  * **ply\_offset\_scale\_factor**: Scale factor for the offsets of the visualized plies if **show\_ply\_offsets** = `True`.
  * **component**: Specifies the component.
  * **use\_all\_available\_fields**: `True` (default) or `False`. Whether to enable all available field variables in the evaluation.
  * **solution\_set**: Selection of the solution set.
* **Returns:**
  The plot object.

#### create\_progressive\_damage\_plot(name=None, id=None, active=True, scope\_entire\_model=True, data\_scope=\[], component=None, spot=None, ply\_wise=False, show\_on\_solids=False, show\_ply\_offsets=False, ply\_offset\_scale\_factor=1.0, solution\_set=-1)

Create a progressive damage plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
  * **active**: Whether the plot is active.
  * **scope\_entire\_model**: If `true`, then the scope of this plot is the entire model. If not, then set to `false` and use the **data\_scope** to specify a subscope.
  * **data\_scope**: Object(s) defining the scope for which data is computed and returned. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
    * Sampling Point
  * **component**: Options:
    * `state` (damage status)
    * `fc` (fiber compressive damage)
    * `ft` (fiber tension damage)
    * `mc` (matrix compressive damage)
    * `mt` (matrix tension damage)
    * `s` (shear damage)
  * **spot**: `bot`, `top`, or `mid` (only if **ply\_wise** = `True`).
  * **ply\_wise**: `True` (default) or `False`. Decides whether to evaluate for individual plies or return the result of the finite element.
  * **show\_on\_solids**: `True` or `False` (default). Whether to show the results on the shell or solid model (if present).
  * **show\_ply\_offsets**: `True` or `False` (default). Whether to display ply-wise visualizations with ply offsets.
  * **ply\_offset\_scale\_factor**: Scale factor for the offsets of the visualized plies if **show\_ply\_offsets** = `True`.
  * **solution\_set**: Selection of the solution set.
* **Returns:**
  The plot object.

**Example:**
Create a progressive damage plot with Data Scope set to Element Set `All_Elements` for ‘e1’ at `mid` in ply\_wise mode:

```python theme={null}
>>> pd_plot = db.active_model.solutions['Solution.1'].plots.create_progressive_damage_plot(self, name="MyPlot", data_scope=db.active_model.element_sets['All_Elements'], component = 'state', spot = 'bot', ply_wise = Flase)
```

#### create\_strain\_plot(name=None, id=None, active=True, scope\_entire\_model=True, data\_scope=\[], component=None, spot=None, ply\_wise=True, show\_on\_solids=False, show\_ply\_offsets=False, ply\_offset\_scale\_factor=1.0, solution\_set=-1)

Create a strain plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
  * **active**: Whether the plot is active.
  * **scope\_entire\_model**: If `true`, then the scope of this plot is the entire model. If not, then set to `false` and use the **data\_scope** to specify a subscope.
  * **data\_scope**: Object(s) defining the scope for which data is computed and returned. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
    * Sampling Point
  * **component**: Options:
    * `e1`
    * `e2`
    * `e3`
    * `e12`
    * `e23`
    * `e13`
    * `eI`
    * `eII`
    * `eIII`
  * **spot**: `bot`, `top`, or `mid` (only if **ply\_wise** = `True`).
  * **ply\_wise**: `True` (default) or `False`. Decides whether to evaluate for individual plies or return the result of the finite element.
  * **show\_on\_solids**: `True` or `False` (default). Whether to show the results on the shell or solid model (if present).
  * **show\_ply\_offsets**: `True` or `False` (default). Whether to display ply-wise visualizations with ply offsets.
  * **ply\_offset\_scale\_factor**: Scale factor for the offsets of the visualized plies if **show\_ply\_offsets** = `True`.
  * **solution\_set**: Selection of the solution set.
* **Returns:**
  The plot object.

**Example:**
Create a strain plot with Data Scope set to Element Set `All_Elements` for `e1` at `mid` in ply\_wise mode:

```python theme={null}
>>> strain_plot = db.active_model.solutions['Solution.1'].plots.create_strain_plot(self, name="MyPlot", data_scope=db.active_model.element_sets['All_Elements'], component = 's1', spot = 'mid', ply_wise = True)
```

#### create\_stress\_plot(name=None, id=None, active=True, scope\_entire\_model=True, data\_scope=\[], component=None, spot=None, ply\_wise=True, show\_on\_solids=False, show\_ply\_offsets=False, ply\_offset\_scale\_factor=1.0, interlaminar\_normal\_stresses=False, solution\_set=-1)

Create a sress plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
  * **active**: Whether the plot is active.
  * **scope\_entire\_model**: If `true`, then the scope of this plot is the entire model. If not, then set to `false` and use the **data\_scope** to specify a subscope.
  * **data\_scope**: Object(s) defining the scope for which data is computed and returned. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
    * Sampling Point
  * **component**: Options:
    * `s1`
    * `s2`
    * `s3`
    * `s12`
    * `s23`
    * `s13`
    * `sI`
    * `sII`
    * `sIII`
  * **spot**: `bot`, `top`, or `mid` (only if **ply\_wise** = `True`).
  * **ply\_wise**: `True` (default) or `False`. Decides whether to evaluate for individual plies or return the result of the finite element.
  * **show\_on\_solids**: `True` or `False` (default). Whether to show the results on the shell or solid model (if present).
  * **show\_ply\_offsets**: `True` or `False` (default). Whether to display ply-wise visualizations with ply offsets.
  * **ply\_offset\_scale\_factor**: Scale factor for the offsets of the visualized plies if **show\_ply\_offsets** = `True`.
  * **solution\_set**: Selection of the solution set.
* **Returns:**
  The plot object.

**Example:**
Create a stress plot with Data Scope set to Element Set `All_Elements` for `s1` at `mid` in ply\_wise mode:

```python theme={null}
>>> stress_plot = db.active_model.solutions['Solution.1'].plots.create_stress_plot(self, name="MyPlot", data_scope=db.active_model.element_sets['All_Elements'], component = 's1', spot = 'mid', ply_wise = True)
```

#### create\_temperature\_plot(name=None, id=None, active=True, scope\_entire\_model=True, data\_scope=\[], component=None, spot=None, ply\_wise=False, show\_on\_solids=True, solution\_set=-1)

Create a temperature plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
  * **active**: Whether the plot is active.
  * **scope\_entire\_model**: If `true`, then the scope of this plot is the entire model. If not, then set to `false` and use the **data\_scope** to specify a subscope.
  * **data\_scope**: Object(s) defining the scope for which data is computed and returned. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
    * Sampling Point
  * **spot**: `bot`, `top`, or `mid` (only if **ply\_wise** = `True`).
  * **ply\_wise**: `True` (default) or `False`. Decides whether to evaluate for individual plies or return the result of the finite element.
  * **solution\_set**: Selection of the solution set.
* **Returns:**
  The plot object.

**Example:**
Create a temperature plot with Data Scope set to Element Set `All_Elements` with spot set to `mid` in ply\_wise mode:

```python theme={null}
>>> temp_plot = db.active_model.solutions['Solution.1'].plots.create_temperature_plot(self, name="MyPlot", data_scope=db.active_model.element_sets['All_Elements'], spot = 'mid', ply_wise = True)
```

#### create\_user\_defined\_plot(name=None, id=None, active=True, scope\_entire\_model=True, data\_scope=\[], user\_data=\[], user\_text=\[], user\_script=None, user\_script\_enabled=False, show\_on\_solids=False, show\_user\_text=False, text\_threshold=0.0, text\_threshold\_type='show\_all', show\_ply\_offsets=False, ply\_offset\_scale\_factor=1.0, add\_to\_active\_set=True, locked=False, solution\_set=-1)

Create a user-defined plot object.

* **Parameters:**
  * **name**: Name of the plot.
  * **id**: ID for the plot.
  * **active**: Whether the plot is active.
  * **scope\_entire\_model**: If `true`, then the scope of this plot is the entire model. If not, then set to `false` and use the **data\_scope** to specify a subscope.
  * **data\_scope**: Object(s) defining the scope for which data is computed and returned. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
    * Sampling Point
  * **user\_data**: Retrieve or provide the user data, which must use the order of the `user_element_indices` or `user_element_labels`, respectively.
  * **user\_text**: Access to the user-defined text of the plot. Empty strings can be inserted when no labels are to be shown for certain elements.
  * **user\_script**: The body of the script to be executed on update if **user\_script\_enabled** = `True`.
  * **user\_script\_enabled**: Boolean that controls if a custom script is run on update.
  * **show\_on\_solids**: `True` or `False` (default). Whether to show the results on the shell or solid model (if present).
  * **show\_user\_text**: `True` or `False` (default). Whether to show the text, which the user provided.
  * **text\_threshold\_type**: Threshold can be set using the **text\_threshold** property. Options:
    * `show_all` (default)
    * `show_only_values_above_threshold`
    * `show_only_values_below_threshold`
  * **text\_threshold**: Threshold used for showing text if **text\_threshold\_type** is not `show_all`
  * **show\_ply\_offsets**: `True` or `False` (default). Whether to display ply-wise visualizations with ply offsets.
  * **ply\_offset\_scale\_factor**: Scale factor for the offsets of the visualized plies if **show\_ply\_offsets** = `True`.
  * **solution\_set**: Selection of the solution set.
* **Returns:**
  The plot object.

**Example:**
Create a user-defined plot with Data Scope set to Element Set `All_Elements`:

```python theme={null}
>>> u_plot = db.active_model.layup_plots.create_user_defined_plot(self, name="MyPlot", data_scope=db.active_model.element_sets['All_Elements'])
```

## `PlotData` classes

### `PlotData` class

#### *class* compolyx.plot\_data.PlotData(graph, obj, parent=None)

#### *property* active

Whether the plot is active or not. An inactive plot is not updated and does not contain data.

#### *property* active\_display\_data

Returns a dictionary containing display data for this plot owned by the active scene.

#### add\_data\_scope\_entity(entity)

Add one entity to the data scope of a plot.

* **Parameters:**
  * **entity**: Entity to be added. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
    * Production Ply
    * Analysis Ply
    * Sampling Point

**Example:**
Add the Element Set `My_ESet` to a my\_plot:

```python theme={null}
>>> my_plot.add_data_scope_entity(entity = db.active_model.element_sets['My_ESet'])
```

#### *property* all\_display\_data

Returns a list of all display data classes in existence for this object.

#### *property* changed

Status boolean. Set to `true` if the underlying data has been changed. Write only property.

#### clear\_data\_scope()

Clears the complete data scope of a plot, such as removing all scope entities.

#### *property* component

The requested result component for a specific plot, such as s1 for the stress in the 1-direction.

#### *property* components

Return the possible component set on this plot type.

#### *property* data\_scope

Data scope of the plot where results will be evaluated.

#### *property* description\_changed

Status boolean. Set to true if the object’s description has been changed. Write only property.

#### display\_data\_create(parent=None)

Function for internal use, not meant for scripting.

#### *property* enabled

Whether this object is currently enabled or not. Mainly defined through the current application mode pre or post.

#### *property* eval\_position

The finite element position at which the results are given, such as centroid or nodal.

#### get\_data(visible=None, selected=None)

Get data of plot.

* **Parameters:**
  * **visible**: Object(s) defining visible scope.
  * **selected**: Selected object(s) for ply-wise evaluations.
* **Returns:**
  Resulting n-dimensional array with plot data for each selected object.
  The scope of the data is evaluated identically as for get\_element\_xx functions as the intersection of:
  * data\_scope of plot
  * visible\_scope defined by visible
  * selection\_scope defined by selected

Data is returned independent of update status of plot, but only if results for the current plot configuration are available, else an empty array is returned.

* **Examples**
  Get data for current ply-wise plot with visible scope set to element set `All_Elements` and with ply1 and ply2 selected:

  ```python theme={null}
  >>> data = my_plot.get_data(visible=db.active_model.element_sets['All_Elements'], selected=[ply1, ply2])
  ```

  Get data for current element-wise plot with visible scope equal to all objects visible in current scene:

  ```python theme={null}
  >>> data = my_plot.get_data(visible=db.active_model.active_scene.active_set.entities)
  ```

#### get\_deformations(visible=None, selected=None)

Function used internally to query matching nodal deformations for a given plot.
To query deformations in a script it is recommended to create a separate deformations plot and query its data using
normal get\_data(…) method.

#### get\_element\_indices(visible=None, selected=None)

Get element indices (ACP internal element numbers starting from 0) of plot.

* **Parameters:**
  * **visible**: Object(s) defining visible scope.
  * **selected**: Selected object(s) for ply-wise evaluations.
* **Returns:**
  Resulting array with element indices from the intersection of:
  * data\_scope of plot
  * visible\_scope defined by visible
  * selection\_scope defined by selected

Indices are returned independent of update status of plot, but only if results for the current plot configuration are available, else an empty array is returned.

**Examples:**
Get element indices for current plot with visible scope set to element set `All_Elements` and with ply1 and ply2 selected:

```python theme={null}
>>> eis = my_plot.get_element_indices(visible=db.active_model.element_sets['All_Elements'], selected=[ply1, ply2])
```

Get element indices for current plot with visible scope equal to all objects visible in current scene:

```python theme={null}
>>> eis = my_plot.get_element_indices(visible=db.active_model.active_scene.active_set.entities)
```

#### get\_element\_labels(visible=None, selected=None)

Get element labels (element numbers as read from/written to mesh files)  of plot.

* **Parameters:**
  * **visible**: Object(s) defining visible scope.
  * **selected**: Selected object(s) for ply-wise evaluations.
* **Returns:**
  Resulting array with element labels from the intersection of:
  * data\_scope of plot
  * visible\_scope defined by visible
  * selection\_scope defined by selected

Labels are returned independent of update status of plot, but only if results for the current plot configuration are available, else an empty array is returned.

**Examples:**
Get element labels for current plot with visible scope set to element set `All_Elements` and with ply1 and ply2 selected:

```python theme={null}
>>> eis = my_plot.get_element_labels(visible=db.active_model.element_sets['All_Elements'], selected=[ply1, ply2])
```

Get element labels for current plot with visible scope equal to all objects visible in current scene:

```python theme={null}
 >>> eis = my_plot.get_element_labels(visible=db.active_model.active_scene.active_set.entities)
```

#### get\_full\_description()

This function returns information displayed together with the legend.
Internal use only, not meant for scripting.

#### *property* has\_element\_wise

Whether the plot offers element-wise data.

#### *property* has\_ply\_wise

Whether the plot offers ply-wise data.

#### *property* locked

Returns the locked status of the plot.

#### *property* name

Name of object.

#### *property* ply\_wise

Whether to plot ply-wise or element-wise.

#### remove\_data\_scope\_entity(entity)

Remove one entity to the data scope of a plot.

* **Parameters:**
  * **entity**: Entity to be removed. Options:
    * Element Set
    * Oriented Selection Set
    * Modeling Ply
    * Production Ply
    * Analysis Ply
    * Sampling Point

**Example:**
Remove the Element Set `My_ESet` from my\_plot:

```python theme={null}
>>> my_plot.remove_data_scope_entity(entity = db.active_model.element_sets['My_ESet'])
```

#### *property* scope\_entire\_model

Whether the plot scope is the entire model or a subset defined by the data\_scope.

#### serialize()

Serialize to Python string.

#### serialize\_properties()

Serialize to Python string.

#### *property* show\_on\_solids

Whether to plot results on solid or shell elements.

#### *property* solution

Solution underlying the plot.

#### *property* solution\_set

Solution set selection.

#### *property* spot

Whether to plot data at bot, mid, or top of the layer or laminate.

#### *property* spots

Return the possible spot set on this plot type.

#### *property* updated

Status boolean. Set to true if the underlying data has been changed. Write only property.

#### *property* uptodate

Whether the plot is uptodate.

### `ContourData` class

#### *class* compolyx.plot\_data.ContourData(graph, obj, parent=None, display\_data=None)

Bases: [`PlotData`](#compolyx.plot_data.PlotData)

#### get\_ply\_offsets(visible=None, selected=None)

Get the offset between plies and reference surface.

* **Parameters:**
  * **visible**: Object(s) defining visible scope.
  * **selected**: Selected object(s) for ply-wise evaluations.
* **Returns:**
  Resulting n-dimensional array of arrays with the ply-offset vectors for each node within the object/ply-selection:
  \[
  \[array(float, float, float), array(float, float, float), …]
  …
  ]

  The scope of the data is evaluated as the intersection of:

  * data\_scope of plot
  * visible\_scope defined by visible
  * selection\_scope defined by selected

**Example:**
Get the ply-offsets for the current ply-wise plot with visible scope set to element set `All_Elements` and with ply1 and ply2 selected:

```python theme={null}
>>> p_offs = my_contour_plot.get_ply_offsets(visible=db.active_model.element_sets['All_Elements'], selected=[ply1, ply2])
```

#### *property* minmax

Min and max value of current data.

#### *property* minmax\_last\_query

Min and max value of data of last query.

#### *property* ply\_offset\_scale\_factor

Offset scale factor.

#### serialize()

Serialize to Python string.

### `AngleData` class

#### *class* compolyx.plot\_data.AngleData(graph, obj, parent=None, display\_data=None)

Bases: [`ContourData`](#compolyx.plot_data.ContourData)

#### *property* spot

Not applicable to an angle plot.

### `ThicknessData` class

#### *class* compolyx.plot\_data.ThicknessData(graph, obj, parent=None, display\_data=None)

Bases: [`ContourData`](#compolyx.plot_data.ContourData)

#### *property* spot

Not applicable to a thickness plot.

### `ScalarFieldData` class

#### *class* compolyx.plot\_data.ScalarFieldData(graph, obj, parent=None)

Bases: [`ContourData`](#compolyx.plot_data.ContourData)

#### get\_support\_point\_coordinates()

Get the coordinates of the supporting points.

* **Returns:**
  Resulting n-dimensional array with the coordinates for each supporting point.

Data is returned independent of update status of plot.

* **Examples**
  Get coordinates for supporting points defining lookup table plot:
  ```python theme={null}
  >>> coords = my_plot._get_support_point_coordinates()
  ```

#### get\_support\_point\_labels()

Get the identifiers for the supporting points.

* **Returns:**
  Resulting n-dimensional array with the supporting point labels.

Labels are returned independent of update status of plot.

* **Examples:**
  Get labels for supporting points defining lookup table plot:
  ```python theme={null}
  >>> coords = my_plot._get_support_point_labels()
  ```

#### get\_support\_point\_values()

Get the scalar values defined at the supporting points.

* **Returns:**
  Resulting n-dimensional array with the scalar values as defined at the supporting points.

Values are returned independent of update status of plot.

* **Examples:**
  Get scalar values for supporting points defining lookup table plot:
  ```python theme={null}
  >>> coords = my_plot._get_support_point_values()
  ```

#### *property* scalar\_field

The underlying scalar field.

#### serialize()

Serialize to Python string.

#### *property* show\_supporting\_point\_labels

Whether to plot the labels of the supporting points.

#### *property* show\_supporting\_points

Whether to the plot supporting points.

#### *property* spot

Not applicable to a scalar field plot.

#### *property* supporting\_point\_scale\_factor

Relative scale factor for the supporting points.

### `DrapingData` class

#### *class* compolyx.plot\_data.DrapingData(graph, obj, parent=None)

Bases: [`PlotData`](#compolyx.plot_data.PlotData)

#### serialize()

Serialize to Python string.

#### serialize\_properties()

Serialize to Python string.

#### *property* show\_draping\_mesh

Whether to plot the draping mesh.

#### *property* show\_flatwrap

Whether to plot the flatwrap.

### `FieldDefinitionData` class

#### *class* compolyx.plot\_data.FieldDefinitionData(graph, obj, parent=None, display\_data=None)

Bases: [`ContourData`](#compolyx.plot_data.ContourData)

#### *property* field\_variable\_name

The underlying field variable name.

#### serialize()

Serialize to Python string.

#### *property* spot

Not applicable to a field definition plot.

### `LayupMappingData` class

#### *class* compolyx.plot\_data.LayupMappingData(graph, obj, parent=None, display\_data=None)

Bases: [`ContourData`](#compolyx.plot_data.ContourData)

#### *property* spot

Not applicable to a layup mapping plot.

### `UserDefinedData` class

#### *class* compolyx.plot\_data.UserDefinedData(graph, obj, parent=None, display\_data=None)

Bases: [`ContourData`](#compolyx.plot_data.ContourData)

#### serialize\_properties()

Serialize to Python string.

#### *property* show\_user\_text

Whether to show the user-defined text labels.

#### *property* spot

Not applicable to a user-defined plot.

#### *property* text\_threshold

Threshold above/below which user text is hidden.

#### *property* text\_threshold\_type

Threshold can be set using the text\_threshold property. Options:

* `show_all` (default)
* `show_only_values_above_threshold`
* `show_only_values_below_threshold`

#### *property* user\_data

Access to the user-defined data of the plot.

#### *property* user\_element\_centroids

Retrieve the centroids of the elements consistent with the current user element indices/labels.

#### *property* user\_element\_indices

Access the indices for the given data-scope.

#### *property* user\_element\_labels

Access the labels for the given data-scope.

#### *property* user\_script

Body of the script to be executed is user\_script\_enabled is set to `True`.

#### *property* user\_script\_enabled

Whether to run a custom script on update.

#### *property* user\_text

Access to the user-defined text of the plot. Note that the get method returns the filtered data which takes the threshold into account.

### `DeformationContourData` class

#### *class* compolyx.plot\_data.DeformationContourData(graph, obj, parent=None, display\_data=None)

Bases: [`ContourData`](#compolyx.plot_data.ContourData)

### `StrainData`

### *class* compolyx.plot\_data.StrainData(graph, obj, parent=None, display\_data=None)

Bases: [`ContourData`](#compolyx.plot_data.ContourData)

### `StressData` class

#### *class* compolyx.plot\_data.StressData(graph, obj, parent=None, display\_data=None)

Bases: [`ContourData`](#compolyx.plot_data.ContourData)

#### *property* interlaminar\_normal\_stresses

Whether to evaluate normal stresses.

### `FailureData` class

#### *class* compolyx.plot\_data.FailureData(graph, obj, parent=None, display\_data=None)

Bases: [`ContourData`](#compolyx.plot_data.ContourData)

#### get\_text(visible=None, selected=None, str\_results=True)

Get text data of failure plot.

* **Parameters:**
  * **visible**: Object(s) defining visible scope.
  * **selected**: Selected object(s) for ply-wise evaluations.
  * **str\_results**: Whether to return failure modes as strings (default) or enums.
* **Returns:**
  Resulting n-dimensional array with a dict with data for each selected object/ply:
  \[
  dict( “fm” : array(int/str),  “li” : array(int), “lc” : array(int) ),
  dict( “fm” : array(int/str),  “li” : array(int), “lc” : array(int) ),
  …
  ]
  Possible keys:

  * `fm`: Failure Mode (enum)
  * `li`:  Layer index
  * `lc`: Load case (for envelope solutions only)

  The scope of the data is evaluated identically as for get\_element\_xxx functions as the intersection of:

  * data\_scope of plot
  * visible\_scope defined by visible
  * selection\_scope defined by selected

Text data is returned independent of update status of plot, but only if results for the current plot configuration are available, else an empty array is returned.

**Examples:**

Get text data for current ply-wise plot with visible scope set to element set `All_Elements` and with ply1 and ply2 selected:

```python theme={null}
>>> text = my_plot.get_text(visible=db.active_model.element_sets['All_Elements'], selected=[ply1, ply2])
```

Get textdata for current element-wise plot with visible scope equal to all objects visible in current scene:

```python theme={null}
>>> text = my_plot.get_text(visible=db.active_model.active_scene.active_set.entities)
```

#### serialize()

Serialize to Python string.

#### *property* show\_critical\_failure\_mode

Whether to evaluate and show the critical failure mode.

#### *property* show\_critical\_layer

Whether to evaluate and show the critical layer.

#### *property* show\_critical\_load\_case

Whether to evaluate and show the critical laod case. Available only for envelope solutions.

#### *property* spot

Not applicable to a failure plot.

#### *property* text\_threshold

Threshold value below which or above which the error mode text is displayed or not. Hidden text becomes `ns` if you query the results by scripting.

#### *property* text\_threshold\_auto

Whether the threshold for visualization of failure text is set automatically or not. Hidden text becomes `ns` if you query the results by scripting.

### `TemperatureData` class

#### *class* compolyx.plot\_data.TemperatureData(graph, obj, parent=None, display\_data=None)

Bases: [`ContourData`](#compolyx.plot_data.ContourData)

### `ProgressiveDamageData` class

#### *class* compolyx.plot\_data.ProgressiveDamageData(graph, obj, parent=None, display\_data=None)

Bases: [`ContourData`](#compolyx.plot_data.ContourData)

#### *property* spot

Not applicable to a progressive damage plot.
