    

 ## On this page

  

 

 # Plot classes

 Last update: 20.02.2025 

## `PlotContainer` classes

### [`PlotDataDict`](#compolyx.plot_data.PlotDataDict) Class

### *class* compolyx.plot\_data.PlotDataDict(name, label=None, obj=None, list=\[\], item\_type=&lt;class 'object'&gt;, 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”:

```default
>>> plot_copy = db.active_model.layup_plots.copy_plot( db.active_model.layup_plots['My_Thickness_Plot'] )

```

### [`LayupPlotDict`](#compolyx.plot_data.LayupPlotDict) Class

### *class* compolyx.plot\_data.LayupPlotDict(name, label=None, obj=None, list=\[\], item\_type=&lt;class 'object'&gt;, 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 a 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 sub scope.
    - data\_scope: Object(s) defining the scope for which data is computed and returned. 
        - Applicable are: Element Set, Oriented Selection Set, Modeling Ply, and 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 or not.
    - ply\_offset\_scale\_factor: Scale factor for the offsets of the visualized plies if show\_ply\_offsets=True.
- **Returns:**The plot object.

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

```default
>>> 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”:

```default
>>> 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 FieldDefinition 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 sub scope.
    - data\_scope: Object(s) defining the scope for which data is computed and returned. Applicable are: 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:

```default
>>> 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. Applicable are: 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 or not.
    - active: Whether the plot is active or not.
- **Returns:**The plot object.

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

```default
>>> 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 or not.
    - 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 sub scope.
    - data\_scope: Object(s) defining the scope for which data is computed and returned. Applicable are: 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 or not.
    - 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 or not.
- **Returns:**The plot object.

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

```default
>>> 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 sub scope.
    - data\_scope: Object(s) defining the scope for which data is computed and returned. Applicable are: 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 or not.
    - 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 sub scope.
    - data\_scope: Object(s) defining the scope for which data is computed and returned. Applicable are: 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 or not.
    - 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:

```default
>>> 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 or not.
    - 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 sub scope.
    - data\_scope: Object(s) defining the scope for which data is computed and returned. Applicable are: 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: “show\_all” (default), “show\_only\_values\_above\_threshold”, “show\_only\_values\_below\_threshold. Threshold can be set using the text\_threshold property.
    - 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 or not.
    - 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”:

```default
>>> u_plot = db.active_model.layup_plots.create_user_defined_plot(self, name="MyPlot", data_scope=db.active_model.element_sets['All_Elements'])

```

### [`PostProcessingPlotDict`](#compolyx.plot_data.PostProcessingPlotDict) Class

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

Container for Post Processing 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 or not.
    - 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 sub scope.
    - data\_scope: Object(s) defining the scope for which data is computed and returned. Applicable are: Element Set, Oriented Selection Set, Modeling Ply, Sampling Point.
    - component: ‘x’, ‘y’, ‘z’, ‘rotx’, ‘roty’, ‘rotz’, ‘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’:

```default
>>> 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 or not.
    - 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 sub scope.
    - data\_scope: Object(s) defining the scope for which data is computed and returned. Applicable are: 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: Ture 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: Ture 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 or not.
    - 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:

```default
>>> 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 or not.
    - 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 sub scope.
    - data\_scope: Object(s) defining the scope for which data is computed and returned. Applicable are: 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 or not.
    - 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 or not.
    - 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 or not.
    - 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 sub scope.
    - data\_scope: Object(s) defining the scope for which data is computed and returned. Applicable are: Element Set, Oriented Selection Set, Modeling Ply, Sampling Point.
    - component: ‘state’, ‘fc’, ‘ft’, ‘mc’, ‘mt’, ‘s’ which are damage status, fiber compressive/tension damage, matrix compressive/tension damage and shear damage.
    - spot: ‘bot’, ‘top’, ‘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 or not.
    - 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:

```default
>>> 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 or not.
    - 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 sub scope.
    - data\_scope: Object(s) defining the scope for which data is computed and returned. Applicable are: Element Set, Oriented Selection Set, Modeling Ply, Sampling Point.
    - component: ‘e1’, ‘e2’, ‘e3’, ‘e12’, ‘e23’, ‘e13’, ‘eI’, ‘eII’, ‘eIII’.
    - spot: ‘bot’, ‘top’, ‘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 or not.
    - 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:

```default
>>> 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 Stress Plot object.

- **Parameters:**
    - name: Name of the plot.
    - id: ID for the plot.
    - active: Whether the plot is active or not.
    - 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 sub scope.
    - data\_scope: Object(s) defining the scope for which data is computed and returned. Applicable are: Element Set, Oriented Selection Set, Modeling Ply, Sampling Point.
    - component: ‘s1’, ‘s2’, ‘s3’, ‘s12’, ‘s23’, ‘s13’, ‘sI’, ‘sII’, ‘sIII’.
    - spot: ‘bot’, ‘top’, ‘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 or not.
    - 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:

```default
>>> 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 or not.
    - 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 sub scope.
    - data\_scope: Object(s) defining the scope for which data is computed and returned. Applicable are: Element Set, Oriented Selection Set, Modeling Ply, Sampling Point.
    - spot: ‘bot’, ‘top’, ‘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:

```default
>>> 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 or not.
    - 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 sub scope.
    - data\_scope: Object(s) defining the scope for which data is computed and returned. Applicable are: 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: “show\_all” (default), “show\_only\_values\_above\_threshold”, “show\_only\_values\_below\_threshold. Threshold can be set using the text\_threshold property
    - 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 or not.
    - 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”:

```default
>>> u_plot = db.active_model.layup_plots.create_user_defined_plot(self, name="MyPlot", data_scope=db.active_model.element_sets['All_Elements'])

```

## [`PlotData`](#compolyx.plot_data.PlotData) classes

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

### *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 it 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 1 entity to the Data Scope of a plot.

- **Parameters:**
    - entity: Entity to be added. Applicable are Element Set, Oriented Selection Set, Modeling Ply, Production Ply, Analysis Ply, and Sampling Point.

**Example:**Add the Element Set “My\_ESet” to a my\_plot:

```default
>>> 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()

Cleares the complete data scope of a plot, i.e. all scope entities are removed at once.

#### *property* component

The requested result component for a specific plot. For instance, 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, e.g. 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:   
    ```default
    >>> 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:   
    ```default &gt;&gt;&gt; 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:

```default
>>> 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:   
 ```default &gt;&gt;&gt; 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:

```default
>>> 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:: ```pycon &gt;&gt;&gt; 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 1 entity to the Data Scope of a plot.

- **Parameters:**
    - entity: Entity to be removed. Applicable are Element Set, Oriented Selection Set, Modeling Ply, Production Ply, Analysis Ply, and Sampling Point.

**Example:**Remove the Element Set “My\_ESet” from my\_plot:

```default
>>> 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`](#compolyx.plot_data.ContourData)

### *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:

```default
>>> 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`](#compolyx.plot_data.AngleData)

### *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`](#compolyx.plot_data.ThicknessData)

### *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`](#compolyx.plot_data.ScalarFieldData)

### *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 look-up table plot:   
    ```default
    >>> 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 look-up table plot:   
    ```default
    >>> 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 look-up table plot:   
    ```default
    >>> 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`](#compolyx.plot_data.DrapingData)

### *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`](#compolyx.plot_data.FieldDefinitionData)

### *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`](#compolyx.plot_data.LayupMappingData)

### *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`](#compolyx.plot_data.UserDefinedData)

### *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 or not.

#### *property* spot

Not applicable to a user-defined plot.

#### *property* text\_threshold

Threshold above/below which user text is hidden.

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

Valid options: `show_all` (default), `show_only_values_above_threshold`, and `show_only_values_below_threshold`. Threshold can be set using the text\_threshold property.

#### *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: The get method returns the filtered data which takes the threshold into account.

### [`DeformationContourData`](#compolyx.plot_data.DeformationContourData)

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

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

### [`StrainData`](#compolyx.plot_data.StrainData)

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

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

### [`StressData`](#compolyx.plot_data.StressData)

### *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`](#compolyx.plot_data.FailureData)

### *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 or enums. (default is str)
- **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:

```default
>>> 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:

```default
>>> 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`](#compolyx.plot_data.TemperatureData)

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

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

### [`ProgressiveDamageData`](#compolyx.plot_data.ProgressiveDamageData)

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