actual在中使用对数刻度颜色编码时,在颜色代码图例中显示值的最佳方法是什么plotly.figure_factory.create_choropleth?
这是示例代码:
import plotly.figure_factory as ff
fips = df['fips']
values = np.log10(df['values'])
endpts = list(np.linspace(0, 4, len(colorscale) - 1))
fig = ff.create_choropleth(fips=fips, values=values, scope = ['usa'], binning_endpoints = endpts)
这是我目前拥有的:
这是我希望拥有的:
与上面的地图完全相同,只是图例中显示的是实际数字而不是 log10(values)。例如,而不是 0.0-0.5 和 0.5-1.0(表示 10^0 到 10^1/2 和 10^1/2 到 10^1)我想看到:1-3、4 -10 等等。
