MapdlTheme#
- class ansys.mapdl.core.plotting.MapdlTheme#
Provides the PyMAPDL-specific theme for PyVista.
The theme includes these defaults:
PyMAPDL colormap as default colormap.
'Courier'
font family for an interactive plot'PyMAPDL'
for the title of an interactive plot
Examples
Create a custom theme with unique parameters from the
MapdlTheme
base.>>> from ansys.mapdl import core as pymapdl >>> my_theme = pymapdl.MapdlTheme() >>> my_theme.background = 'white' >>> my_theme.axes.show = False >>> my_theme.show_scalar_bar = False
Apply this theme to element plotting.
>>> mapdl.eplot(theme=theme)
Apply this theme to area plotting.
>>> mapdl.aplot(theme=theme)
Methods
MapdlTheme.from_dict
(dict_)Create from a dictionary.
MapdlTheme.load_theme
(theme)Overwrite the current theme with a theme.
Restore the theme defaults.
MapdlTheme.save
(filename)Serialize this theme to a json file.
Return theme config parameters as a dictionary.
Attributes
Return or set the default above range color.
Return or set whether to allow plotting empty meshes.
Enable or disable anti-aliasing.
Automatically close the figures when finished plotting.
Return or set the default
axes
configuration.Return or set the default background color of pyvista plots.
Return the default before_close_callback function for Plotter.
Return or set the default below range color.
Return or set the default camera position.
Return or set the default colormap of pyvista.
Return or set the default color of meshes in pyvista.
Return or set the default color cycler used to color meshes.
Return or set the default parameters of a horizontal colorbar.
Return or set the default colorbar orientation.
Return or set the default parameters of a vertical colorbar.
Return or set the default depth peeling parameters.
Return or set the default edge color.
Return or set the edges opacity.
Enable the camera orientation widget in all plotters.
Return or set the default floor color.
Return or set the default font size, family, and/or color.
Return if figures are shown in full screen.
Return or set hidden line removal.
Return or set the default image scale factor.
Return or set the default
interactive
parameter.Return or set whether to interpolate colors before mapping.
Return or set the jupyter notebook plotting backend.
Return or set the default
lighting
.Return or set the default lighting configuration.
Return or set the default line width.
Return or set the logo file.
Return or set the default
multi_rendering_splitting_position
parameter.Return or set the default
multi_samples
parameter.Return or set the name of the theme.
Return or set the default NaN color.
Return or set the state of notebook plotting.
Return or set the opacity.
Return or set the default outline color.
Return or set the default point size.
Return or set the default
render_lines_as_tubes
parameter.Return or set the default
render_points_as_spheres
parameter.Return or set the default behavior of returning the camera position.
Set or return the angle of the sharp edges feature angle.
Return or set the default edge visibility.
Return or set the default color bar visibility.
Return or set the default vertex visibility.
Return or set the default
silhouette
configuration.Return the default slider style configurations.
Return or set the default
smooth_shading
parameter.Set or return splitting sharp edges.
Return or set the default
title
parameter.Return or set the default trame parameters.
Return or set the default
transparent_background
parameter.Return or set the default
volume_mapper
parameter.Return or set the default render window size.