Plotly error while plotting into ipywidget output on Databricks
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 04:24 AM
Hello, while plotting into databricks notebook with plotly into ipywidget output, I am getting following error SyntaxError: expected expression, got ','. Here is my snippet.
import ipywidgets, random
import plotly.express as px
from plotly.offline import plot
from IPython.display import display, clear_output
out = ipywidgets.Output()
button = ipywidgets.Button(description = 'button')
def on_button_clicked(b):
with out:
clear_output(True)
p = plot( px.scatter(x = [random.randint(1, 100) for i in range(4)], y = [random.randint(1, 100) for i in range(4)]), output_type='div')
displayHTML(p)
button.on_click(on_button_clicked)
display(button)
out
Labels:
- Labels:
-
Workflows
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 03:14 AM
Hi, you are right. It seems that figurewidget is the only option, if we need to plot into ipywidgets.

