Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
binning_endpoints ->plotly
#1
Hi Guys,

I'm struggling with issue related to creating choropleth chart. My list of binning endpoints consist of 10 elements, but my map is presenting only 6 levels. Could you please help me with this?

My list of binning endpoints:

 qqq = [335.907, 676.254, 1016.601, 1356.948, 1697.295, 2037.642, 2377.989, 2718.336, 3058.683, 3399.03]
My piece of code where I genarate the graph:

qqq = sorted(binning_endpoints)
    
    colorscale = [
    'rgb(68.0, 1.0, 84.0)',
    'rgb(66.0, 64.0, 134.0)',
    'rgb(38.0, 130.0, 142.0)',
    'rgb(63.0, 188.0, 115.0)',
    'rgb(100.0, 170.0, 25.0)',
    'rgb(170.0, 190.0, 25.0)',
    'rgb(189.0, 205.0, 25.0)',
    'rgb(205.0, 210.0, 25.0)',
    'rgb(216.0, 226.0, 25.0)',
    'rgb(222.0, 233.0, 25.0)',
    'rgb(242.0, 255.0, 13.0)'
    ]

    fig2 = ff.create_choropleth(fips=fips, values=values,colorscale=colorscale,binning_endpoints=qqq,round_legend_values=True,title='Sales per district')          
    st.plotly_chart(fig2)
My current map:

[Image: zsysWwH]

Does anyone can help me with this issue? :)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  plotly expression problem Visiting 2 2,014 May-16-2021, 12:28 AM
Last Post: Visiting
  Plotly library with AIX 6.X / 7.X ? HK2432 0 1,468 Jan-14-2020, 06:04 PM
Last Post: HK2432
  Plotly error - AttributeError: module 'plotly.plotly' has no attribute 'iplot' fernando_santos 0 5,606 Jul-24-2019, 02:35 PM
Last Post: fernando_santos

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020