plot_contour#

ResultData.plot_contour(display_option: str = 'time', option_id=1, **kwargs)#

Plot the contour result on its mesh support.

The obtained figure depends on the support, which can be a meshed region or a time frequency support. For a transient analysis, this method plots the last result if no time scoping is specified. To return a string containing all label spaces, use the self.get_all_label_spaces() method.

Parameters:
display_optionstr, optional

Name of the label to display. The default is "time".

option_id: int, optional

Label ID to display. The default is 1.

**kwargsoptional

Additional keyword arguments for the plotter. For keyword arguments, see help(pyvista.plot).

Examples

Plot a result at time step number 1.

>>> from ansys.dpf import post
>>> from ansys.dpf.post import examples
>>> solution = post.load_solution(examples.download_all_kinds_of_complexity())
>>> stress = solution.stress(location=post.locations.nodal)
>>> sx = stress.xx
>>> pl = sx.plot_contour("time", [1], off_screen=True)  

Obtain labels.

>>> sx.get_all_label_spaces() 
[{'...': ..., '...': ...}, {'...': ..., '...': ...}]