    

 ## On this page

  

 

 # create\_user\_defined\_plot

 Last update: 16.07.2026 

<a id="compolyx.plot_data.LayupPlotDict.create_user_defined_plot"></a>

## LayupPlotDict.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 sub scope.
- data\_scope: One or more objects 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.
- 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'])

```