Closed fedro86 closed 1 year ago
Seems like this already works?
colormap = linear.viridis.scale(0, 100)
ImageOverlay(
image=data,
bounds=[[53.804418158693835, -0.9254649843200244], [47.42086714394442, 9.65841513678867]],
opacity=0.7,
crs='EPSG4326',
colormap=colormap
).add_to(m)
This has been fixed recently, fix is not yet in the latest release, but available on the main branch. See https://github.com/python-visualization/folium/issues/1571#issuecomment-1400081656
Code Sample
Problem description Code above creates a raster map over Central Europe. Unfortunately the only possibility to make it colored it is through a matplotlib.colors that however doesn't allow to define vmin vmax.
Expected output By using the branca.colormap LinearColormap and StepColormaap as a parameter in ImageOverlay this issue should be solved and one should be able to define both colormap and color range for any raster.
Output of folium.version folium 0.14.0