<jupyter_start><jupyter_text>plotly-extension  Plotly(data: list, layout: dict)<jupyter_code>def Plotly(data=[], layout={}):
    bundle = {}
    bundle['application/vnd.plotly.v1+json'] = {
        'data': data,
        'layout': layout,
    }
    display(bundle, raw=True)

data = [
    {'x': [1999, 2000, 2001, 2002], 'y': [10, 15, 13, 17], 'type': 'scatter'},
    {'x': [1999, 2000, 2001, 2002], 'y': [16, 5, 11, 9], 'type': 'scatter'}
]

layout = {
    'title': 'Sales Growth',
    'xaxis': {'title': 'Year', 'showgrid': False, 'zeroline': False},
    'yaxis': {'title': 'Percent', 'showline': False}
}

Plotly(data, layout)<jupyter_output><empty_output><jupyter_text>Plotly(data: plotly.graph_objs.graph_objs.Heatmap)Using [plotly](https://github.com/plotly/plotly.py) library<jupyter_code>import plotly
from IPython.display import display
import json

def Plotly(data=[], layout={}):
    bundle = {}
    bundle['application/vnd.plotly.v1+json'] = {
        'data': json.loads(json.dumps(data, cls=plotly.utils.PlotlyJSONEncoder)),
        'layout': json.loads(json.dumps(layout, cls=plotly.utils.PlotlyJSONEncoder)),
    }
    display(bundle, raw=True)
    
trace = plotly.graph_objs.Heatmap(z=[[1, 20, 30],
                      [20, 1, 60],
                      [30, 60, 1]])
data=[trace]
Plotly(data)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19402985074626866, 'fraction_numerical': 0.04701492537313433, 'mean_word_length': 3.8763636363636365, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '342024', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 562, 'n_tokens_neox': 496, 'n_words': 93, 'path': 'notebooks/plotly-extension.ipynb', 'repo_name': 'jasongrout/jupyter-renderers', 'size': '1340'}