pybop.plot.plotly_manager#

Classes#

PlotlyManager

Manages the installation and configuration of Plotly for generating visualizations.

Module Contents#

class pybop.plot.plotly_manager.PlotlyManager[source]#

Manages the installation and configuration of Plotly for generating visualizations.

This class ensures that Plotly is installed and properly configured to display plots in a web browser.

Upon instantiation, it checks for Plotly’s presence, installs it if missing, and configures the default renderer and browser settings.

go#

The Plotly graph_objects module for creating figures.

Type:

module

pio#

The Plotly input/output module for configuring the renderer.

Type:

module

make_subplots#

The function from Plotly for creating subplot figures.

Type:

function

Examples

>>> plotly_manager = PlotlyManager()
check_browser_availability()[source]#

Confirm a web browser is available for Plotly’s ‘browser’ renderer; provide guidance if not.

check_renderer_settings()[source]#

Check and provide information on setting the Plotly renderer if it’s not already set.

ensure_plotly_installed()[source]#

Check if Plotly is installed and import necessary modules; prompt for installation if missing.

static install_plotly()[source]#

Install the Plotly package using pip. Exit if installation fails.

post_install_setup()[source]#

Import Plotly modules and set the default renderer after installation.

prompt_for_plotly_installation()[source]#

Prompt the user for Plotly installation and install it upon agreement.

go = None#
make_subplots = None#
pio = None#