holoviews
holoviews copied to clipboard
Mathjax behavior and font settings don't work for Text objects (for Bokeh backend)
The fontsize option does not affect the text size for hv.Text objects. Additionally, the text is not rendered by mathjax. Additionally, setting fontsize has an unintended effect on the label size.
I think that the text of hv.Text should be rendered by mathjax when wrapped with $$
and fontsize should change the size of the text (as indicated by hv.help(hv.Text)) -- There is an open issue for this latter behavior.
ALL software version info
Windows 10 Python 3.11 holoviews 1.18.3 numpy 1.24.1 bokeh 3.3.4
Complete, minimal, self-contained example code that reproduces the issue
import numpy as np
import holoviews as hv
xs=np.arange(0,10)
ys=np.sin(xs)
bug = (hv.Curve((xs,ys), label=r'$$\sin(x)$$').opts(ylabel=r'$$\sin(x)$$') * hv.Text(5,0,r'$$x$$', label=r'$$x$$').opts(fontsize=30)).opts(show_legend=True, ylabel=r'$$\sin(x)$$')
Screenshots or screencasts of the bug in action
- [ ] I may be interested in making a pull request to address this