How to put mapdl plots into the pyvista.plotter subplots? #1822
-
Hi
Am I right in assuming this is possible, or will the mesh added to the subplot with the plotter.add_mesh command need to be of some other format? Best regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 15 replies
-
Hi @MrMechanics Remember that all the plotting functions (which uses Having said that, you can do something like: from ansys.mapdl.core import launch_mapdl
import pyvista as pv
# import code...
# Run model
# Plotting
plotter = pv.Plotter(shape=(1, 3))
plotter.subplot(0, 0)
mapdl.eplot(plotter=plotter, return_plotter=True) # 'return_plotter' is to avoid plotting yet
plotter.subplot(0, 1)
mapdl.nplot(plotter=plotter, return_plotter=True)
plotter.subplot(0, 2)
mapdl.post_processing.plot_element_stress("X", plotter=plotter, return_plotter=True)
plotter.show() and it should work :) |
Beta Was this translation helpful? Give feedback.
Hi @MrMechanics
Remember that all the plotting functions (which uses
vtk=True
) pass by the function general_plotter hence they accepts any arguments that this function accept.So you could use the argument
plotter
to tell PyMAPDL to reuse an specific plotter.Having said that, you can do something like: