简体   繁体   中英

Plotly Choropleth showing no output

I was trying to plot choropleth map using plotly but getting a blank output.I am not getting any map.here is my code- input-

import plotly.plotly as py
from plotly.offline import download_plotlyjs,init_notebook_mode,plot,iplot
import plotly.graph_objs as go
init_notebook_mode(connected=True)
%matplotlib inline
data = dict(type = 'choropleth',
        locations = ['AZ','CA','NY'],
        locationmode = 'USA-states',
        colorscale= 'Portland',
        text= ['text1','text2','text3'],
        z=[1.0,2.0,3.0],
        colorbar = {'title':'Colorbar Title'})
 layout = dict(geo = {'scope':'usa'})
 choromap = go.Figure(data=[data] , layout=layout)
 iplot(choromap )

output- it is a blank screen. I am sharing my screenshot.What is the issue? Thank you in advance

https://drive.google.com/file/d/14R6zfNxnefBoe3RFlFH2YunlTbrFzfRX/view?usp=sharing

Just double click on the white space and you will get the desired output. This worked for me. Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM