I am creating a colormap to map colors in a folium choropleth map, using code from here:
from branca.colormap import linearcolormap = linear.RdBu.scale(df.MyValue.min(),df.MyValue.max())colormap
As you can see, the min and max values are skewed compared to the 0, and I'd like this to be reflected in the colormap, i.e. only values < 0 should be mapped to red, while all positive values should be mapped to blue.
Is there a way to have this asymmetry in the colormap? I haven't seen many examples on the web.
I am doing like:
colormap = colormap.to_step(index=[-200, 0, 1200])
but it's not smooth: