aplot#
- Mapdl.aplot(na1='', na2='', ninc='', degen='', scale='', *, graphics_backend=None, quality=4, show_area_numbering=False, show_line_numbering=False, color_areas=False, show_lines=False, **kwargs)#
Display the selected areas.
Displays the selected areas from
na1tona2in steps ofninc.APDL Command:
APLOTNote
PyMAPDL plotting commands with
graphics_backend=GraphicsBackend.PYVISTAignore any values set with thePNUMcommand.- 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
graphics_backend=GraphicsBackend.PYVISTA.- 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
graphics_backend != GraphicsBackend.MAPDL.- graphics_backend
GraphicsBackend,optional Plot the currently selected areas using
ansys-tools-visualization_interface. 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
graphics_backend=GraphicsBackend.PYVISTA.- show_area_numberingbool,
optional Display area numbers when
graphics_backend=GraphicsBackend.PYVISTA.- show_line_numberingbool,
optional Display line numbers when
graphics_backend=GraphicsBackend.PYVISTA.- color_areas
Union[bool,str,np.array],optional Only used when
graphics_backend=GraphicsBackend.PYVISTA. Ifcolor_areasis a bool, randomly color areas whenTrue. Ifcolor_areasis a string, it must be a valid color string which will be applied to all areas. Ifcolor_areasis 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.visualizer.MapdlPlotterfor more keyword arguments applicable when visualizing withgraphics_backend=GraphicsBackend.PYVISTA.
- 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()