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.

MapdlTheme.restore_defaults()

Restore the theme defaults.

MapdlTheme.save(filename)

Serialize this theme to a json file.

MapdlTheme.to_dict()

Return theme config parameters as a dictionary.

Attributes

MapdlTheme.above_range_color

Return or set the default above range color.

MapdlTheme.allow_empty_mesh

Return or set whether to allow plotting empty meshes.

MapdlTheme.anti_aliasing

Enable or disable anti-aliasing.

MapdlTheme.auto_close

Automatically close the figures when finished plotting.

MapdlTheme.axes

Return or set the default axes configuration.

MapdlTheme.background

Return or set the default background color of pyvista plots.

MapdlTheme.before_close_callback

Return the default before_close_callback function for Plotter.

MapdlTheme.below_range_color

Return or set the default below range color.

MapdlTheme.camera

Return or set the default camera position.

MapdlTheme.cmap

Return or set the default colormap of pyvista.

MapdlTheme.color

Return or set the default color of meshes in pyvista.

MapdlTheme.color_cycler

Return or set the default color cycler used to color meshes.

MapdlTheme.colorbar_horizontal

Return or set the default parameters of a horizontal colorbar.

MapdlTheme.colorbar_orientation

Return or set the default colorbar orientation.

MapdlTheme.colorbar_vertical

Return or set the default parameters of a vertical colorbar.

MapdlTheme.depth_peeling

Return or set the default depth peeling parameters.

MapdlTheme.edge_color

Return or set the default edge color.

MapdlTheme.edge_opacity

Return or set the edges opacity.

MapdlTheme.enable_camera_orientation_widget

Enable the camera orientation widget in all plotters.

MapdlTheme.floor_color

Return or set the default floor color.

MapdlTheme.font

Return or set the default font size, family, and/or color.

MapdlTheme.full_screen

Return if figures are shown in full screen.

MapdlTheme.hidden_line_removal

Return or set hidden line removal.

MapdlTheme.image_scale

Return or set the default image scale factor.

MapdlTheme.interactive

Return or set the default interactive parameter.

MapdlTheme.interpolate_before_map

Return or set whether to interpolate colors before mapping.

MapdlTheme.jupyter_backend

Return or set the jupyter notebook plotting backend.

MapdlTheme.lighting

Return or set the default lighting.

MapdlTheme.lighting_params

Return or set the default lighting configuration.

MapdlTheme.line_width

Return or set the default line width.

MapdlTheme.logo_file

Return or set the logo file.

MapdlTheme.multi_rendering_splitting_position

Return or set the default multi_rendering_splitting_position parameter.

MapdlTheme.multi_samples

Return or set the default multi_samples parameter.

MapdlTheme.name

Return or set the name of the theme.

MapdlTheme.nan_color

Return or set the default NaN color.

MapdlTheme.notebook

Return or set the state of notebook plotting.

MapdlTheme.opacity

Return or set the opacity.

MapdlTheme.outline_color

Return or set the default outline color.

MapdlTheme.point_size

Return or set the default point size.

MapdlTheme.render_lines_as_tubes

Return or set the default render_lines_as_tubes parameter.

MapdlTheme.render_points_as_spheres

Return or set the default render_points_as_spheres parameter.

MapdlTheme.return_cpos

Return or set the default behavior of returning the camera position.

MapdlTheme.sharp_edges_feature_angle

Set or return the angle of the sharp edges feature angle.

MapdlTheme.show_edges

Return or set the default edge visibility.

MapdlTheme.show_scalar_bar

Return or set the default color bar visibility.

MapdlTheme.show_vertices

Return or set the default vertex visibility.

MapdlTheme.silhouette

Return or set the default silhouette configuration.

MapdlTheme.slider_styles

Return the default slider style configurations.

MapdlTheme.smooth_shading

Return or set the default smooth_shading parameter.

MapdlTheme.split_sharp_edges

Set or return splitting sharp edges.

MapdlTheme.title

Return or set the default title parameter.

MapdlTheme.trame

Return or set the default trame parameters.

MapdlTheme.transparent_background

Return or set the default transparent_background parameter.

MapdlTheme.volume_mapper

Return or set the default volume_mapper parameter.

MapdlTheme.window_size

Return or set the default render window size.