folium
folium copied to clipboard
HTML LaTeX symbol isn't rendered
Describe the bug
I have tried to add LaTeX symbol using HTML code, but folium doesn't render it correctly.
To Reproduce
from branca.colormap import linear
import folium
colormap_choice = linear.YlOrRd_04
vmin = 3.2
vmax = 10.3
colormap = colormap_choice.scale(vmin, vmax)
colormap.caption = 'Δx'
m = folium.Map()
colormap.add_to(m)
Note that if I check the colormap without folium, that's fine:
from branca.colormap import linear
colormap_choice = linear.YlOrRd_04
vmin = 3.2
vmax = 10.3
colormap = colormap_choice.scale(vmin, vmax)
colormap.caption = 'Δx'
Expected behavior
The caption is $\Delta$ x.
Environment (please complete the following information):
- Browser: chrome
- Jupyter Notebook
- Python version: 3.10
- folium version: 0.14.0
- branca version: 0.6.0
BTW, the colorbar tick labels are different from the original defined colormap. It seems that's another related issue.