python-visualization / folium

Python Data. Leaflet.js Maps.
https://python-visualization.github.io/folium/
MIT License
6.95k stars 2.23k forks source link

Legend colorbar position and resizing #1605

Open postdatacrc opened 2 years ago

postdatacrc commented 2 years ago

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

Conengmo commented 2 years ago

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 commented 1 year ago

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