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 to na2 in steps of ninc.

APDL Command: APLOT

Note

PyMAPDL plotting commands with vtk=True ignore any values set with the PNUM command.

Parameters:
na1int, optional

Minimum area to display.

na2int, optional

Maximum area to display.

nincint, optional

Increment between minimum and maximum area.

degen, str, optional

Degeneracy marker. This option is ignored when vtk=True.

scalefloat, 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.

qualityint, 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_areasUnion[bool, str, np.array], optional

Only used when vtk=True. If color_areas is a bool, randomly color areas when True. If color_areas is a string, it must be a valid color string which will be applied to all areas. If color_areas is an array or list made of color names (str) or the RGBa numbers ([R, G, B, transparency]), it colors each area with the 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 with vtk=True.

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()