Plots#

class ansys.fluent.visualization.plotter.plotter_objects.Plots(session, post_api_helper=<class 'ansys.fluent.core.post_objects.post_helper.PostAPIHelper'>, local_surfaces_provider=None)#

This class provides access to Plots object containers for a given session so that plots can be created.

In the following example, a Plots object is instantiated with a Fluent session as its context. The Plots object is used to generate and plot two XY plots and a monitor plot.

from ansys.fluent.visualization import Plots

plots_session = Plots(session)
plot1 = plots_session.XYPlots["plot-1"]
plot1.surfaces = ['symmetry', 'wall']
plot1.y_axis_function = "temperature"
plot1.plot("window-0")


#To plot data on local surface created in PyVista

from ansys.fluent.visualization import  Graphics
pyvista_surface_provider = Graphics(session).Surfaces
plots_session = Plots(session, pyvista_surface_provider)
plot2 = plots_session.XYPlots["plot-2"]
plot2.surfaces = ['iso-surface-1']
plot2.y_axis_function = "temperature"
plot2.plot("window-0")


#To plot monitors

monitor1=plots_session.Monitors["monitor-1"]
monitor1.monitor_set_name = "residual"
monitor1.plot("window-0")