Ниже мой код из Jupyter Notebook.
import chart_studio.plotly as py
import plotly.graph_objects as go
init_notebook_mode(connected=True)
data = dict(type='choropleth',
locations=['CA', 'NY', 'AZ'],
locationmode='USA-states',
colorscale='ylorbr',
text=['text1','text2','text3'],
z=[1.0, 2.0, 3.0],
colorbar={'title':'ColorbarTitle'})
#text- which hovers over all the locations
layout=dict(geo={'scope':'usa'})
choromap = go.figure(data=[data], layout=layout)
Я уже выполнил следующие шаги: pip install chart-studio pip install ipywidgets
Используемая версия Plotly: 4.7.1
Ниже приведена трассировка ошибки:
The nearest I have found is the below links:
https://community.plotly.com/t/attributeerror-module-plotly-graph-objs-has-no-attribute-figurewidget-after-upgrading-to-plotly-4-7/39034
И
также попробовали следующее: from plotly import graph_objects as go
Заранее спасибо ..