@@ -289,7 +289,7 @@ def plot_iter(
289289 def show (
290290 self ,
291291 show_plane : bool = False ,
292- jupyter_backend : Optional [str ] = None ,
292+ jupyter_backend : Optional [str ] = "trame" , # Use the PyVista default backend
293293 ** kwargs : Optional [Dict ],
294294 ) -> None :
295295 """Show the rendered scene on the screen.
@@ -298,6 +298,8 @@ def show(
298298 ----------
299299 show_plane : bool, default: True
300300 Whether to show the XY plane.
301+ jupyter_backend : str, default: None
302+ PyVista Jupyter backend.
301303 **kwargs : dict, default: None
302304 Plotting keyword arguments. For allowable keyword arguments, see the
303305 :meth:`Plotter.show <pyvista.Plotter.show>` method.
@@ -320,13 +322,17 @@ def show(
320322 plane = pv .Plane (i_size = sfac * 1.3 , j_size = sfac * 1.3 )
321323 self .scene .add_mesh (plane , color = "white" , show_edges = True , opacity = 0.1 )
322324
325+ # Override Jupyter backend if building docs
326+ if viz_interface .USE_HTML_BACKEND :
327+ jupyter_backend = "html"
328+
323329 # Enabling anti-aliasing by default on scene
324330 self .scene .enable_anti_aliasing ("ssaa" )
325331
326332 # If screenshot is requested, set off_screen to True for the plotter
327333 if kwargs .get ("screenshot" ) is not None :
328334 self .scene .off_screen = True
329- self .scene .show (** kwargs )
335+ self .scene .show (jupyter_backend = jupyter_backend , ** kwargs )
330336
331337 def set_add_mesh_defaults (self , plotting_options : Optional [Dict ]) -> None :
332338 """Set the default values for the plotting options.
0 commit comments