postprocessing.plotly.utils =========================== .. py:module:: postprocessing.plotly.utils Functions --------- .. autoapisummary:: postprocessing.plotly.utils.get_available_styles postprocessing.plotly.utils.get_style postprocessing.plotly.utils.get_colors postprocessing.plotly.utils.save_figs Module Contents --------------- .. py:function:: get_available_styles() Function to get a list of the names of the available styles. :Returns: list List of names of available styles. .. !! processed by numpydoc !! .. py:function:: get_style(style_name='doumont-light') Function to get the stylesheet that can be passed to plotly's style setting functions. :Parameters: **style_name** : str Name of desired style. Default is "doumont-light". :Returns: tuple of string and dict The style string and dictionary (as a tuple) that can be passed to the plotly template setting function. .. !! processed by numpydoc !! .. py:function:: get_colors(style_name=None, rcParams=False) Function to get colors associated with a Plotly template. :Parameters: **style_name** : str Name of the desired Plotly template. Default is None, which returns the colors from the current template. **rcParams** : bool Flag to return additional color settings (axis, background, text). Default is False. :Returns: dict Dictionary of colors used in the template. .. !! processed by numpydoc !! .. py:function:: save_figs(fig, name, formats, format_kwargs=None, **kwargs) Function to save Plotly figures in multiple file formats with user-specified options. :Parameters: **fig** : Plotly figure The figure to save. **name** : str Output path for the figure files, e.g "path/to/file/file_name". No file extension required. **formats** : str or list File formats to save the figure in, e.g. "png", "pdf", "svg", "html". **format_kwargs** : dict A dictionary of dictionaries, where the keys are the file formats and the values are any keyword arguments that should only be applied to that format. These kwargs will be added to ones passed to all formats, by default None. **kwargs** Any keyword arguments to pass to the saving function for all formats. .. !! processed by numpydoc !!