aplot#
- Mapdl.aplot(na1='', na2='', ninc='', degen='', scale='', vtk=None, quality=4, show_area_numbering=False, show_line_numbering=False, color_areas=False, show_lines=False, **kwargs)[source]#
Display the selected areas.
Displays the selected areas from
na1
tona2
in steps ofninc
.APDL Command:
APLOT
Note
PyMAPDL plotting commands with
vtk=True
ignore any values set with thePNUM
command.- Parameters:
- na1
int
,optional
Minimum area to display.
- na2
int
,optional
Maximum area to display.
- ninc
int
,optional
Increment between minimum and maximum area.
- degen, str, optional
Degeneracy marker. This option is ignored when
vtk=True
.- scale
float
,optional
Scale factor for the size of the degeneracy-marker star. The scale is the size in window space (-1 to 1 in both directions) (defaults to 0.075). This option is ignored when
vtk=True
.- vtkbool,
optional
Plot the currently selected areas using
pyvista
. As this creates a temporary surface mesh, this may have a long execution time for large meshes.- quality
int
,optional
Quality of the mesh to display. Varies between 1 (worst) to 10 (best) when
vtk=True
.- show_area_numberingbool,
optional
Display area numbers when
vtk=True
.- show_line_numberingbool,
optional
Display line numbers when
vtk=True
.- color_areas
np.array
,optional
Only used when
vtk=True
. Ifcolor_areas
is a bool, randomly color areas whenTrue
. Ifcolor_areas
is an array or list, it colors each area with the RGB colors, specified in that array or list.- show_linesbool,
optional
Plot lines and areas. Change the thickness of the lines with
line_width=
- **kwargs
See
ansys.mapdl.core.plotting.general_plotter()
for more keyword arguments applicable when visualizing withvtk=True
.
- na1
Examples
Plot areas between 1 and 4 in increments of 2.
>>> mapdl.block(0, 1, 0, 1, 0, 1) >>> mapdl.aplot(1, 4, 2)
Plot all areas and randomly color the areas. Label center of areas by their number.
>>> mapdl.aplot(show_area_numbering=True, color_areas=True)
Return the plotting instance and modify it.
>>> mapdl.aplot() >>> pl = mapdl.aplot(return_plotter=True) >>> pl.show_bounds() >>> pl.set_background('black') >>> pl.add_text('my text') >>> pl.show()