Skip to content

Uncaught ReferenceError: Plotly is not defined #1595

@maddukurisrinivasarao

Description

@maddukurisrinivasarao

I am trying to create plots from jupyter kernel (based on ProcessMetaKernel) and display plots in jupyter notebook.

My Jupyter kernel code is

class MyKernel(ProcessMetaKernel):
def do_execute_direct(self, code, silent=True):
import plotly
import plotly.graph_objs as go
plot_div=plotly.offline.plot({"data": [go.Scatter(x=[1, 2, 3, 4], y=[4, 3, 2, 1])],"layout":
go.Layout(title="hello world")}, auto_open=False, output_type='div',include_plotlyjs=True)
self.Display(HTML(data=plot_div))
return code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions