
    -Phh{                     (   d Z ddlZddlZddlZddlmZ ddlmZ ddlm	Z	 g dZ
d Zd	 Zd
 Zd!dZd Zd"dZdZdZd Zd Zd#dZ	 	 	 	 	 	 	 	 	 	 d$dZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d%dZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 d&dZ	 	 	 	 	 	 	 	 	 	 d'dZ	 	 	 	 	 	 d(d ZdS ))zPlotly Offline
A module to use Plotly's graphing library with Python
without connecting to a public or private plotly enterprise
server.
    N)
get_module)tools   __plotlyjs_version__)jpegpngwebpsvgc                 :    t          j        dt                     d S )Nz
        `download_plotlyjs` is deprecated and will be removed in the
        next release. plotly.js is shipped with this module, it is no
        longer necessary to download this bundle separately.
    )warningswarnDeprecationWarning)download_urls    V/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/plotly/offline/offline.pydownload_plotlyjsr      s*    M	
 	        c                      t           S )z
    Returns the version of plotly.js that is bundled with plotly.py.

    Returns
    -------
    str
        Plotly.js version string
    r    r   r   get_plotlyjs_versionr      s
      r   c                      t           j                            dd          } t          j        d|                               d          }|S )a  
    Return the contents of the minified plotly.js library as a string.

    This may be useful when building standalone HTML reports.

    Returns
    -------
    str
        Contents of the minified plotly.js library as a string

    Examples
    --------
    Here is an example of creating a standalone HTML report that contains
    two plotly figures, each in their own div.  The include_plotlyjs argument
    is set to False when creating the divs so that we don't include multiple
    copies of the plotly.js library in the output.  Instead, a single copy
    of plotly.js is included in a script tag in the html head element.

    >>> import plotly.graph_objs as go
    >>> from plotly.offline import plot, get_plotlyjs
    >>> fig1 = go.Figure(data=[{'type': 'bar', 'y': [1, 3, 2]}],
    ...                 layout={'height': 400})
    >>> fig2 = go.Figure(data=[{'type': 'scatter', 'y': [1, 3, 2]}],
    ...                  layout={'height': 400})
    >>> div1 = plot(fig1, output_type='div', include_plotlyjs=False)
    >>> div2 = plot(fig2, output_type='div', include_plotlyjs=False)

    >>> html = '''
    ... <html>
    ...     <head>
    ...         <script type="text/javascript">{plotlyjs}</script>
    ...     </head>
    ...     <body>
    ...        {div1}
    ...        {div2}
    ...     </body>
    ... </html>
    ... '''.format(plotlyjs=get_plotlyjs(), div1=div1, div2=div2)

    >>> with open('multi_plot.html', 'w') as f:
    ...      f.write(html) # doctest: +SKIP
    package_datazplotly.min.jsplotlyzutf-8)ospathjoinpkgutilget_datadecode)r   plotlyjss     r   get_plotlyjsr!   *   s?    V 7<<88D$//66w??HOr   Plotlyc                 4    d                     ||           }|S )Nz<script type="text/javascript">window.addEventListener("resize", function(){{if (document.getElementById("{id}")) {{{plotly_root}.Plots.resize(document.getElementById("{id}"));}};}})</script>)plotly_rootidformat)	plotdividr$   resize_scripts      r   _build_resize_scriptr*   Z   s'    	 ff33  r   c                 .    d                     |           S )Nz4<script src="{url}?config=TeX-AMS-MML_SVG"></script>urlr&   r,   s    r   _build_mathjax_scriptr.   f   s    AHHSHQQQr   c                    d| rPt          | t                    r;fd| D             }|r(t          j        d                    |                     | }ni }t          j                    }|                    dd           s||d<   |dk    re|                    dd           dk    rK|                    d	d
                              dd
          }|d                             d|          }||d<   |S )N)#
staticPlotplotlyServerURLeditableeditsautosizable
responsivequeueLength	fillFrameframeMargins
scrollZoomdoubleClickshowTipsshowAxisDragHandlesshowAxisRangeEntryBoxesshowLinksendDatashowSendToCloudlinkTextshowSourcesdisplayModeBarmodeBarButtonsToRemovemodeBarButtonsToAddmodeBarButtonstoImageButtonOptionsdisplaylogo	watermarkplotGlPixelRatiosetBackgroundtopojsonURLmapboxAccessTokenloggingglobalTransformslocalelocalesdoubleClickDelayc                     g | ]}|v|	S r   r   ).0k
configkeyss     r   
<listcomp>z _get_jconfig.<locals>.<listcomp>   s#    ???A1J+>+>a+>+>+>r   z3
Unrecognized config options supplied: {bad_config})
bad_configr1   zhttps://plot.lyrA   Export to plot.lyzhttps:// zhttp://zplot.ly)	
isinstancedictr   r   r'   r   get_config_plotly_server_urlgetreplace)configrX   clean_configplotly_platform_urllink_domain	link_textrV   s         @r   _get_jconfigre   j   s5   $JL  *VT** 
 @??????
 	M66<f) 7= 7 7   <>>-t44 >*=&' 	000Z..2EEE)11*bAAII)UWXX ,44YLL	#,Z r   zW<script type="text/javascript">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>z<script type="text/javascript">if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: "STIX-Web"}});}</script>c                 b    | dk    rd}d}n| dk    rd}d}nt          d          d|z   dz   |z   S )	av  
    This function will return a script that will download an image of a Plotly
    plot.

    Keyword Arguments:
    caller ('plot', 'iplot') -- specifies which function made the call for the
        download script. If `iplot`, then an extra condition is added into the
        download script to ensure that download prompts aren't initiated on
        page reloads.
    iplotz(if(document.readyState == 'complete') {{z}}plotrZ   z.caller should only be one of `iplot` or `plot`zfunction downloadimage(format, height, width, filename) {{var p = document.getElementById('{{plot_id}}');Plotly.downloadImage(p, {{format: format, height: height, width: width, filename: filename}});}};z;downloadimage('{format}', {height}, {width}, '{filename}');)
ValueError)callercheck_start	check_ends      r   get_image_download_scriptrm      si     @			6				IJJJ	2
 		 %	%	r   c                     | rY| t           vr't          d                    t                               t          |          }|                    | |||          }nd }|S )Nz4The image parameter must be one of the following: {})r'   widthheightfilename)__IMAGE_FORMATSri   r'   rm   )imageimage_filenameimage_heightimage_widthrj   scriptpost_scripts          r   build_save_image_post_scriptry      s}      ''  & 7 7  
 +622mm#	 $ 
 
 r   Fc                     ddl m} t          d          }|st          d          | rd|j        _        nd|j        _        |j                                         dS )a)  
    Initialize plotly.js in the browser if it hasn't been loaded into the DOM
    yet. This is an idempotent method and can and should be called from any
    offline methods that require plotly.js to be loaded into the notebook dom.

    Keyword arguments:

    connected (default=False) -- If True, the plotly.js library will be loaded
    from an online CDN. If False, the plotly.js library will be loaded locally
    from the plotly python package

    Use `connected=True` if you want your notebooks to have smaller file sizes.
    In the case where `connected=False`, the entirety of the plotly.js library
    will be loaded into the notebook, which will result in a file-size increase
    of a couple megabytes. Additionally, because the library will be downloaded
    from the web, you and your viewers must be connected to the internet to be
    able to view charts within this notebook.

    Use `connected=False` if you want you and your collaborators to be able to
    create and view these charts regardless of the availability of an internet
    connection. This is the default option since it is the most predictable.
    Note that under this setting the library will be included inline inside
    your notebook, resulting in much larger notebook sizes compared to the case
    where `connected=True`.
    r   NIPython0`iplot` can only run inside an IPython Notebook.z"plotly_mimetype+notebook_connectedzplotly_mimetype+notebook)	plotly.ioior   ImportError	renderersdefault_activate_pending_renderers)	connectedpioipythons      r   init_notebook_moder      sv    4 ##G NLMMM ; D : M--/////r   rY   T
plot_image   X  c                 V   ddl m} t          d          }|st          d          |rt	          |          ni }|                    d|           |                    d|           t          j        | |          }t          ||||d          }|	                    ||||	||
           dS )	a  
    Draw plotly graphs inside an IPython or Jupyter notebook

    figure_or_data -- a plotly.graph_objs.Figure or plotly.graph_objs.Data or
                      dict or list that describes a Plotly graph.
                      See https://plot.ly/python/ for examples of
                      graph descriptions.

    Keyword arguments:
    show_link (default=False) -- display a link in the bottom-right corner of
                                of the chart that will export the chart to
                                Plotly Cloud or Plotly Enterprise
    link_text (default='Export to plot.ly') -- the text of export link
    validate (default=True) -- validate that all of the keys in the figure
                               are valid? omit if your version of plotly.js
                               has become outdated with your version of
                               graph_reference.json or if you need to include
                               extra, unnecessary keys in your figure.
    image (default=None |'png' |'jpeg' |'svg' |'webp') -- This parameter sets
        the format of the image to be downloaded, if we choose to download an
        image. This parameter has a default value of None indicating that no
        image should be downloaded. Please note: for higher resolution images
        and more export options, consider using plotly.io.write_image. See
        https://plot.ly/python/static-image-export/ for more details.
    filename (default='plot') -- Sets the name of the file your image
        will be saved to. The extension should not be included.
    image_height (default=600) -- Specifies the height of the image in `px`.
    image_width (default=800) -- Specifies the width of the image in `px`.
    config (default=None) -- Plot view options dictionary. Keyword arguments
        `show_link` and `link_text` set the associated options in this
        dictionary if it doesn't contain them already.
    auto_play (default=True) -- Whether to automatically start the animation
        sequence on page load, if the figure contains frames. Has no effect if
        the figure does not contain frames.
    animation_opts (default=None) -- Dict of custom animation parameters that
        are used for the automatically started animation on page load. This
        dict is passed to the function Plotly.animate in Plotly.js. See
        https://github.com/plotly/plotly.js/blob/master/src/plots/animation_attributes.js
        for available options. Has no effect if the figure
        does not contain frames, or auto_play is False.

    Example:
    ```
    from plotly.offline import init_notebook_mode, iplot
    init_notebook_mode()
    iplot([{'x': [1, 2, 3], 'y': [5, 2, 7]}])
    # We can also download an image of the plot by setting the image to the
    format you want. e.g. `image='png'`
    iplot([{'x': [1, 2, 3], 'y': [5, 2, 7]}], image='png')
    ```

    animation_opts Example:
    ```
    from plotly.offline import iplot
    figure = {'data': [{'x': [0, 1], 'y': [0, 1]}],
              'layout': {'xaxis': {'range': [0, 5], 'autorange': False},
                         'yaxis': {'range': [0, 5], 'autorange': False},
                         'title': 'Start Title'},
              'frames': [{'data': [{'x': [1, 2], 'y': [1, 2]}]},
                         {'data': [{'x': [1, 4], 'y': [1, 4]}]},
                         {'data': [{'x': [3, 4], 'y': [3, 4]}],
                          'layout': {'title': 'End Title'}}]}
    iplot(figure, animation_opts={'frame': {'duration': 1}})
    ```
    r   Nr{   r|   r>   rA   rg   )validater`   	auto_playrx   animation_opts)
r}   r~   r   r   r\   
setdefaultr   !return_figure_from_figure_or_datary   show)figure_or_data	show_linkrd   r   rs   rq   rv   ru   r`   r   r   r   r   figurerx   s                  r   rg   rg   #  s    \ ##G NLMMM#+T&\\\F
j),,,
j),,, 4^XNNF /x{G K
 HH%      r   filetemp-plot.htmlc                    ddl m} |dvrt          d|z   dz             |                    d          s%|dk    rt	          j        d|z   d	z              |dz  }|rt          |          ni }|                    d
|           |                    d|           t          j	        | |          }|
                    di           
                    dd          }|
                    di           
                    dd          }|dk    s|dk    r|                    dd           t          ||	||
d          }|dk    r"|                    |||||||d|||           |S |                    ||||||d||	  	        S )a  Create a plotly graph locally as an HTML document or string.

    Example:
    ```
    from plotly.offline import plot
    import plotly.graph_objs as go

    plot([go.Scatter(x=[1, 2, 3], y=[3, 2, 6])], filename='my-graph.html')
    # We can also download an image of the plot by setting the image parameter
    # to the image format we want
    plot([go.Scatter(x=[1, 2, 3], y=[3, 2, 6])], filename='my-graph.html',
         image='jpeg')
    ```
    More examples below.

    figure_or_data -- a plotly.graph_objs.Figure or plotly.graph_objs.Data or
                      dict or list that describes a Plotly graph.
                      See https://plot.ly/python/ for examples of
                      graph descriptions.

    Keyword arguments:
    show_link (default=False) -- display a link in the bottom-right corner of
        of the chart that will export the chart to Plotly Cloud or
        Plotly Enterprise
    link_text (default='Export to plot.ly') -- the text of export link
    validate (default=True) -- validate that all of the keys in the figure
        are valid? omit if your version of plotly.js has become outdated
        with your version of graph_reference.json or if you need to include
        extra, unnecessary keys in your figure.
    output_type ('file' | 'div' - default 'file') -- if 'file', then
        the graph is saved as a standalone HTML file and `plot`
        returns None.
        If 'div', then `plot` returns a string that just contains the
        HTML <div> that contains the graph and the script to generate the
        graph.
        Use 'file' if you want to save and view a single graph at a time
        in a standalone HTML file.
        Use 'div' if you are embedding these graphs in an HTML file with
        other graphs or HTML markup, like a HTML report or an website.
    include_plotlyjs (True | False | 'cdn' | 'directory' | path - default=True)
        Specifies how the plotly.js library is included in the output html
        file or div string.

        If True, a script tag containing the plotly.js source code (~3MB)
        is included in the output.  HTML files generated with this option are
        fully self-contained and can be used offline.

        If 'cdn', a script tag that references the plotly.js CDN is included
        in the output. HTML files generated with this option are about 3MB
        smaller than those generated with include_plotlyjs=True, but they
        require an active internet connection in order to load the plotly.js
        library.

        If 'directory', a script tag is included that references an external
        plotly.min.js bundle that is assumed to reside in the same
        directory as the HTML file.  If output_type='file' then the
        plotly.min.js bundle is copied into the directory of the resulting
        HTML file. If a file named plotly.min.js already exists in the output
        directory then this file is left unmodified and no copy is performed.
        HTML files generated with this option can be used offline, but they
        require a copy of the plotly.min.js bundle in the same directory.
        This option is useful when many figures will be saved as HTML files in
        the same directory because the plotly.js source code will be included
        only once per output directory, rather than once per output file.

        If a string that ends in '.js', a script tag is included that
        references the specified path. This approach can be used to point
        the resulting HTML file to an alternative CDN.

        If False, no script tag referencing plotly.js is included. This is
        useful when output_type='div' and the resulting div string will be
        placed inside an HTML document that already loads plotly.js.  This
        option is not advised when output_type='file' as it will result in
        a non-functional html file.
    filename (default='temp-plot.html') -- The local filename to save the
        outputted chart to. If the filename already exists, it will be
        overwritten. This argument only applies if `output_type` is 'file'.
    auto_open (default=True) -- If True, open the saved file in a
        web browser after saving.
        This argument only applies if `output_type` is 'file'.
    image (default=None |'png' |'jpeg' |'svg' |'webp') -- This parameter sets
        the format of the image to be downloaded, if we choose to download an
        image. This parameter has a default value of None indicating that no
        image should be downloaded. Please note: for higher resolution images
        and more export options, consider making requests to our image servers.
        Type: `help(py.image)` for more details.
    image_filename (default='plot_image') -- Sets the name of the file your
        image will be saved to. The extension should not be included.
    image_height (default=600) -- Specifies the height of the image in `px`.
    image_width (default=800) -- Specifies the width of the image in `px`.
    config (default=None) -- Plot view options dictionary. Keyword arguments
        `show_link` and `link_text` set the associated options in this
        dictionary if it doesn't contain them already.
    include_mathjax (False | 'cdn' | path - default=False) --
        Specifies how the MathJax.js library is included in the output html
        file or div string.  MathJax is required in order to display labels
        with LaTeX typesetting.

        If False, no script tag referencing MathJax.js will be included in the
        output. HTML files generated with this option will not be able to
        display LaTeX typesetting.

        If 'cdn', a script tag that references a MathJax CDN location will be
        included in the output.  HTML files generated with this option will be
        able to display LaTeX typesetting as long as they have internet access.

        If a string that ends in '.js', a script tag is included that
        references the specified path. This approach can be used to point the
        resulting HTML file to an alternative CDN.
    auto_play (default=True) -- Whether to automatically start the animation
        sequence on page load if the figure contains frames. Has no effect if
        the figure does not contain frames.
    animation_opts (default=None) -- Dict of custom animation parameters that
        are used for the automatically started animation on page load. This
        dict is passed to the function Plotly.animate in Plotly.js. See
        https://github.com/plotly/plotly.js/blob/master/src/plots/animation_attributes.js
        for available options. Has no effect if the figure
        does not contain frames, or auto_play is False.

    Example:
    ```
    from plotly.offline import plot
    figure = {'data': [{'x': [0, 1], 'y': [0, 1]}],
              'layout': {'xaxis': {'range': [0, 5], 'autorange': False},
                         'yaxis': {'range': [0, 5], 'autorange': False},
                         'title': 'Start Title'},
              'frames': [{'data': [{'x': [1, 2], 'y': [1, 2]}]},
                         {'data': [{'x': [1, 4], 'y': [1, 4]}]},
                         {'data': [{'x': [3, 4], 'y': [3, 4]}],
                          'layout': {'title': 'End Title'}}]}
    plot(figure, animation_opts={'frame': {'duration': 1}})
    ```
    r   N)divr   z>`output_type` argument must be 'div' or 'file'. You supplied `z``z.htmlr   zYour filename `z>` didn't end with .html. Adding .html to the end of your file.r>   rA   layoutro   z100%rp   r5   Trh   )	r`   r   include_plotlyjsinclude_mathjaxrx   	full_htmlr   r   	auto_openF)r`   r   r   r   rx   r   r   r   )r}   r~   ri   endswithr   r   r\   r   r   r   r^   ry   
write_htmlto_html)r   r   rd   r   output_typer   rq   r   rs   rt   rv   ru   r`   r   r   r   r   r   ro   rp   rx   s                        r   rh   rh     s   n  /))*+-12
 
 	
 W%% +*?*?( ,4 4	
 	
 	
 	G $+T&\\\F
j),,,
j),,,4^XNNFJJx$$((&99EZZ"%%))(F;;F&F**,--- /~|[& K f-+#) 	 	
 	
 	
 {{-+#)  

 

 
	
r   c                 f    t          j        | |||          }t          |||||||	|
||||          S )a  
    Convert a matplotlib figure to a Plotly graph stored locally as HTML.

    For more information on converting matplotlib visualizations to plotly
    graphs, call help(plotly.tools.mpl_to_plotly)

    For more information on creating plotly charts locally as an HTML document
    or string, call help(plotly.offline.plot)

    mpl_fig -- a matplotlib figure object to convert to a plotly graph

    Keyword arguments:
    resize (default=False) -- allow plotly to choose the figure size.
    strip_style (default=False) -- allow plotly to choose style options.
    verbose (default=False) -- print message.
    show_link (default=False) -- display a link in the bottom-right corner of
        of the chart that will export the chart to Plotly Cloud or
        Plotly Enterprise
    link_text (default='Export to plot.ly') -- the text of export link
    validate (default=True) -- validate that all of the keys in the figure
        are valid? omit if your version of plotly.js has become outdated
        with your version of graph_reference.json or if you need to include
        extra, unnecessary keys in your figure.
    output_type ('file' | 'div' - default 'file') -- if 'file', then
        the graph is saved as a standalone HTML file and `plot`
        returns None.
        If 'div', then `plot` returns a string that just contains the
        HTML <div> that contains the graph and the script to generate the
        graph.
        Use 'file' if you want to save and view a single graph at a time
        in a standalone HTML file.
        Use 'div' if you are embedding these graphs in an HTML file with
        other graphs or HTML markup, like a HTML report or an website.
    include_plotlyjs (default=True) -- If True, include the plotly.js
        source code in the output file or string.
        Set as False if your HTML file already contains a copy of the plotly.js
        library.
    filename (default='temp-plot.html') -- The local filename to save the
        outputted chart to. If the filename already exists, it will be
        overwritten. This argument only applies if `output_type` is 'file'.
    auto_open (default=True) -- If True, open the saved file in a
        web browser after saving.
        This argument only applies if `output_type` is 'file'.
    image (default=None |'png' |'jpeg' |'svg' |'webp') -- This parameter sets
        the format of the image to be downloaded, if we choose to download an
        image. This parameter has a default value of None indicating that no
        image should be downloaded.
    image_filename (default='plot_image') -- Sets the name of the file your
        image will be saved to. The extension should not be included.
    image_height (default=600) -- Specifies the height of the image in `px`.
    image_width (default=800) -- Specifies the width of the image in `px`.

    Example:
    ```
    from plotly.offline import init_notebook_mode, plot_mpl
    import matplotlib.pyplot as plt

    init_notebook_mode()

    fig = plt.figure()
    x = [10, 15, 20, 25, 30]
    y = [100, 250, 200, 150, 300]
    plt.plot(x, y, "o")

    plot_mpl(fig)
    # If you want to to download an image of the figure as well
    plot_mpl(fig, image='png')
    ```
    )rs   rt   ru   rv   )r   mpl_to_plotlyrh   )mpl_figresizestrip_styleverboser   rd   r   r   r   rq   r   rs   rt   ru   rv   plotly_plots                   r   plot_mplr   b  sV    l %gv{GLLK%!   r   c           
      ^    t          j        | |||          }t          |||||||	|
          S )a@	  
    Convert a matplotlib figure to a plotly graph and plot inside an IPython
    notebook without connecting to an external server.

    To save the chart to Plotly Cloud or Plotly Enterprise, use
    `plotly.plotly.plot_mpl`.

    For more information on converting matplotlib visualizations to plotly
    graphs call `help(plotly.tools.mpl_to_plotly)`

    For more information on plotting plotly charts offline in an Ipython
    notebook call `help(plotly.offline.iplot)`

    mpl_fig -- a matplotlib.figure to convert to a plotly graph

    Keyword arguments:
    resize (default=False) -- allow plotly to choose the figure size.
    strip_style (default=False) -- allow plotly to choose style options.
    verbose (default=False) -- print message.
    show_link (default=False) -- display a link in the bottom-right corner of
                                of the chart that will export the chart to
                                Plotly Cloud or Plotly Enterprise
    link_text (default='Export to plot.ly') -- the text of export link
    validate (default=True) -- validate that all of the keys in the figure
                               are valid? omit if your version of plotly.js
                               has become outdated with your version of
                               graph_reference.json or if you need to include
                               extra, unnecessary keys in your figure.
    image (default=None |'png' |'jpeg' |'svg' |'webp') -- This parameter sets
        the format of the image to be downloaded, if we choose to download an
        image. This parameter has a default value of None indicating that no
        image should be downloaded.
    image_filename (default='plot_image') -- Sets the name of the file your
        image will be saved to. The extension should not be included.
    image_height (default=600) -- Specifies the height of the image in `px`.
    image_width (default=800) -- Specifies the width of the image in `px`.

    Example:
    ```
    from plotly.offline import init_notebook_mode, iplot_mpl
    import matplotlib.pyplot as plt

    fig = plt.figure()
    x = [10, 15, 20, 25, 30]
    y = [100, 250, 200, 150, 300]
    plt.plot(x, y, "o")

    init_notebook_mode()
    iplot_mpl(fig)
    # and if you want to download an image of the figure as well
    iplot_mpl(fig, image='jpeg')
    ```
    )rs   rq   ru   rv   )r   r   rg   )r   r   r   r   r   rd   r   rs   rt   ru   rv   r   s               r   	iplot_mplr     sJ    D %gv{GLLK!	 	 	 	r   c           	          t                       t          d          }t          d          }|j        j                                        }|j        j        d         }	|	                    |j        j	         fd           dS )a  
    Convert mpl plots to locally hosted HTML documents.

    This function should be used with the inline matplotlib backend
    that ships with IPython that can be enabled with `%pylab inline`
    or `%matplotlib inline`. This works by adding an HTML formatter
    for Figure objects; the existing SVG/PNG formatters will remain
    enabled.

    (idea taken from `mpld3._display.enable_notebook`)

    Example:
    ```
    from plotly.offline import enable_mpl_offline
    import matplotlib.pyplot as plt

    enable_mpl_offline()

    fig = plt.figure()
    x = [10, 15, 20, 25, 30]
    y = [100, 250, 200, 150, 300]
    plt.plot(x, y, "o")
    fig
    ```
    r{   
matplotlibz	text/htmlc           	      .    t          |           S N)r   )figrd   r   r   r   r   r   s    r   <lambda>z$enable_mpl_offline.<locals>.<lambda>A  s     Igy)X
 
 r   N)
r   r   core
getipythonget_ipythondisplay_formatter
formattersfor_typer   Figure)
r   r   r   r   rd   r   r   r   ip	formatters
   ``````    r   enable_mpl_offliner     s    B ##GL))J		 	,	,	.	.B$/<I 	
 	
 	
 	
 	
 	
 	
 	
 	
    r   )r"   r   )F)
FrY   TNr   r   r   NTN)FrY   Tr   Tr   TNr   r   r   NFTN)FFFFrY   Tr   Tr   TNr   r   r   )
FFFFrY   TNr   r   r   )FFFFrY   T)__doc__r   r   r   plotly.optional_importsr   r   r   _plotlyjs_versionr   rr   r   r   r!   r*   r.   re   _window_plotly_config_mathjax_configrm   ry   r   rg   rh   r   r   r   r   r   r   <module>r      sP    
			   . . . . . .       3 3 3 3 3 3 100  	  	  	 - - -`	 	 	 	R R RG G G GX 
  B  .'0 '0 '0 '0X !
h h h hZ !
!Q
 Q
 Q
 Q
l !
d d d dR !
L L L L` !, , , , , ,r   