python-visualization / branca

This library is a spinoff from folium, that would host the non-map-specific features.
https://python-visualization.github.io/branca/
MIT License
111 stars 63 forks source link

Caption Font Size #92

Closed jojubart closed 1 year ago

jojubart commented 3 years ago

Is there a way to increase the size of the colormap caption?

Conengmo commented 1 year ago

Take a look at https://github.com/python-visualization/branca/issues/91#issuecomment-1166392776, which contains a snippet to add css that affects the colormap. You could do something similar with font size probably.

varsha2509 commented 9 months ago

Here is a solution:

svg_style = '<style>svg#legend {font-size: 14px; background-color: white;}</style>'
map.get_root().header.add_child(folium.Element(svg_style))

You can remove the white-background if you don't need that.