eplot#
- Mapdl.eplot(show_node_numbering=False, vtk=None, **kwargs)#
Plots the currently selected elements.
APDL Command: EPLOT
Note
PyMAPDL plotting commands with
vtk=True
ignore any values set with thePNUM
command.- Parameters:
- vtkbool,
optional
Plot the currently selected elements using
ansys-tools-visualization_interface
. Defaults to currentuse_vtk
setting.- 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 usingvtk
.
- vtkbool,
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)