folium icon indicating copy to clipboard operation
folium copied to clipboard

HTML LaTeX symbol isn't rendered

Open zxdawn opened this issue 2 years ago • 1 comments

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)

image

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'

image

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

zxdawn avatar Sep 24 '23 19:09 zxdawn

BTW, the colorbar tick labels are different from the original defined colormap. It seems that's another related issue.

zxdawn avatar Sep 24 '23 19:09 zxdawn