folium icon indicating copy to clipboard operation
folium copied to clipboard

Legend colorbar position and resizing

Open postdatacrc opened this issue 3 years ago • 2 comments

I'm having trouble visualizing the colorbar that is located in the upper right corner, when a choropleth is used. I would like to know if there is a way to specify both the location and the size of both the bar and the font.

What I'm searching is a feature that can be added to the folium.Choropleth() attribute such as legend_position=[0.8 ,0.9]
legend_fontsize=14 legend_width=10

postdatacrc avatar Jul 01 '22 03:07 postdatacrc

Width is now available:

Choropleth()
choropleth.color_scale.width =1000

Position and fontsize are not. PRs are welcome, look at the ColorMap class in our branca repo, then color_scale.js.

Conengmo avatar Nov 17 '22 15:11 Conengmo

Other duplicate issues also requested being able to specify a position like 'topleft'.

Conengmo avatar Mar 12 '23 13:03 Conengmo