#### 6.10.2.1. PlotData

`class compolyx.plot_data.PlotData`(graph, obj, parent=None)

`active`

  Whether the plot is active or not; an inactive plot is not updated and it does not contain data.

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

        >>> my_plot.add_data_scope_entity(entity = db.active_model.element_sets['My_ESet'])

`all_display_data`

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

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

`component`

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

`components`

  Return the possible component set on this plot type

`data_scope`

  Data scope of the plot where results will be evaluated.

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

`enabled`

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

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

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

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

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

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

        >>> eis = my_plot.get_element_labels(visible=db.active_model.element_sets['All_Elements'], selected=[ply1, ply2])

`get_full_description`()

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

`has_element_wise`

  Whether the plot offers element-wise data.

`has_ply_wise`

  Whether the plot offers ply-wise data.

`locked`

  Returns the locked status of the plot

`name`

  Name of object

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

        >>> my_plot.remove_data_scope_entity(entity = db.active_model.element_sets['My_ESet'])

`serialize`()

  Serialize to Python string

`serialize_properties`()

  Serialize to Python string

`show_on_solids`

  Whether to plot results on solid or shell elements.

`solution`

  Solution underlying the plot.

`solution_set`

  Solution Set selection.

`spot`

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

`spots`

  Return the possible spot set on this plot type

`updated`

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

`uptodate`

  Whether the plot is uptodate.

Release 18.2 - © ANSYS, Inc. All rights reserved.