binning_endpoints ->plotly - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: binning_endpoints ->plotly (/thread-37919.html) |
binning_endpoints ->plotly - Luis_liverpool - Aug-09-2022 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: Does anyone can help me with this issue? :) |