eplot#
- Mapdl.eplot(show_node_numbering=False, *, graphics_backend=None, **kwargs)#
Plots the currently selected elements.
APDL Command: EPLOT
Note
PyMAPDL plotting commands with
graphics_backend=GraphicsBackend.PYVISTAignore any values set with thePNUMcommand.- Parameters:
- graphics_backend
GraphicsBackend,optional Plot the currently selected elements using the picked backend. Defaults to current
graphics_backendsetting.- show_node_numberingbool,
optional Plot the node numbers of surface nodes.
- plot_bcbool,
optional Activate the plotting of the boundary conditions. Defaults to
False.Warning
This is in alpha state.
- plot_bc_legendbool,
optional Shows the boundary conditions legend. Defaults to
False- plot_bc_labelsbool,
optional Shows the boundary conditions label per node. Defaults to
False.- bc_labels
List[str],Tuple(str),optional List or tuple of strings with the boundary conditions to plot, i.e.
["UX", "UZ"]. You can obtain the allowed boundary conditions by evaluatingansys.mapdl.core.plotting.BCS. You can use also the following shortcuts:‘mechanical’ To plot the following mechanical boundary conditions:
'UX','UY','UZ','FX','FY', and'FZ'. Rotational or momentum boundary conditions are not allowed.'thermal'To plot the following boundary conditions: ‘TEMP’ and ‘HEAT’.'electrical'To plot the following electrical boundary conditions:'VOLT','CHRGS', and'AMPS'.
Defaults to all the allowed boundary conditions present in the responses of
ansys.mapdl.core.Mapdl.dlist()andansys.mapdl.core.Mapdl.flist().- bc_target
List[str],Tuple(str),optional Specify the boundary conditions target to plot, i.e. “Nodes”, “Elements”. You can obtain the allowed boundary conditions target by evaluating
ansys.mapdl.core.plotting.ALLOWED_TARGETS. Defaults to only"Nodes".- bc_glyph_size
float,optional Specify the size of the glyph used for the boundary conditions plotting. By default is ratio of the bounding box dimensions.
- bc_labels_font_size
float,optional Size of the text on the boundary conditions labels. By default it is 16.
- **kwargs
See
help(ansys.mapdl.core.plotting.visualizer.MapdlPlotter)for more keyword arguments related to visualizing usinggraphics_backend.
- graphics_backend
- Returns:
objectPlot display object when using PyVista graphics backend, None otherwise.
Examples
>>> mapdl.clear() >>> mapdl.prep7() >>> mapdl.block(0, 1, 0, 1, 0, 1) >>> mapdl.et(1, 186) >>> mapdl.esize(0.1) >>> mapdl.vmesh('ALL') >>> mapdl.vgen(2, 'all') >>> mapdl.eplot(show_edges=True, smooth_shading=True, show_node_numbering=True)
Save a screenshot to disk without showing the plot
>>> mapdl.eplot(background='w', show_edges=True, smooth_shading=True, window_size=[1920, 1080], savefig='screenshot.png', off_screen=True)