# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/05_display.ipynb.

# %% auto 0
__all__ = ['custom_show']

# %% ../nbs/05_display.ipynb 2
from plotly import graph_objects as go

# %% ../nbs/05_display.ipynb 3
def custom_show(
    fig:go.Figure,
    filename:str = None
):
    """ A custom version of the `show` method of a Plotly Figure. 
    
    - Removes the Plotly logo from the display
    - Downloaded plots are higher quality 'SVG' format
    - Allows you to pass 'filename' argument to customize the name of the downloaded file 
    """
    config = {
      'toImageButtonOptions': {
        'format': 'svg', # one of png, svg, jpeg, webp
        'scale': 1 # Multiply title/legend/axis/canvas sizes by this factor
      },
        'displaylogo':False
        
    }

    if filename:
        config['toImageButtonOptions']['filename']=filename
    fig.show(config=config)

