plotly 0.7.0

A plotting library powered by Plotly.js
Documentation
<div>
    <div id="{{ plot_div_id }}" class="plotly-graph-div" style="height:100%; width:100%;"></div>
    <script type="text/javascript">
        require(['https://cdn.plot.ly/plotly-2.8.3.min.js'], function(Plotly) {
            window.PLOTLYENV=window.PLOTLYENV || {};

            if (document.getElementById("{{ plot_div_id }}")) {
                {{ plot_data }}
                Plotly.newPlot(
                    '{{ plot_div_id }}',
                    data,
                    layout,
                    {"responsive": true}
                ).then(function(){
                    var gd = document.getElementById('{{ plot_div_id }}');
                    var x = new MutationObserver(function (mutations, observer) { {
                            var display = window.getComputedStyle(gd).display;
                            if (!display || display === 'none') { {
                                console.log([gd, 'removed!']);
                                Plotly.purge(gd);
                                observer.disconnect();
                            } }
                    } });

                    // Listen for the removal of the full notebook cells
                    var notebookContainer = gd.closest('#notebook-container');
                    if (notebookContainer) { {
                        x.observe(notebookContainer, {childList: true});
                    } }

                    // Listen for the clearing of the current output cell
                    var outputEl = gd.closest('.output');
                    if (outputEl) { {
                        x.observe(outputEl, {childList: true});
                    } } })
            };
        });
            </script>
</div>