mne.viz.create_3d_figure#

mne.viz.create_3d_figure(size, bgcolor=(0, 0, 0), smooth_shading=None, handle=None, *, scene=True, show=False)[source]#

Return an empty figure based on the current 3d backend.

Warning

Proceed with caution when the renderer object is returned (with scene=False) because the _Renderer API is not necessarily stable enough for production, it’s still actively in development.

Parameters:
sizetuple

The dimensions of the 3d figure (width, height).

bgcolortuple

The color of the background.

smooth_shadingbool | None

Whether to enable smooth shading. If None, uses the config value MNE_3D_OPTION_SMOOTH_SHADING. Defaults to None.

handleint | None

The figure identifier.

scenebool

If True (default), the returned object is the Figure3D. If False, an advanced, undocumented Renderer object is returned (the API is not stable or documented, so this is not recommended).

showbool

If True, show the renderer immediately.

New in version 1.0.

Returns:
figureinstance of Figure3D or Renderer

The requested empty figure or renderer, depending on scene.

Examples using mne.viz.create_3d_figure#

The role of dipole orientations in distributed source localization

The role of dipole orientations in distributed source localization

Plot the MNE brain and helmet

Plot the MNE brain and helmet