I have been adding
LatexLabel’s to many of my graphs in the past as explained in the docs of bokeh 4.2.1
[Creating LaTeX labels — Bokeh 2.4.1 Documentation]
Adding latex axis labels is supported in the latest version, but not
Label’s in general
However, trying to add
LatexLabel now gives the following
compilation failed messages
error TS2339: Property ‘xview’ does not exist on type ‘Panel | CartesianFrame’.
Property ‘xview’ does not exist on type ‘Panel’.
error TS2339: Property ‘yview’ does not exist on type ‘Panel | CartesianFrame’.
Property ‘yview’ does not exist on type ‘Panel’.
Would anyone know whether this can be fixed easily?
Are you using
components or otherwise have a template that explicitly loads BokehJS? The most likely explanation is that you are loading a too-old version of BokehJS and need to update it to match the python version you are using now. Otherwise, it is not possible to speculate more without a complete Minimal Reproducible Example to actually investigate.
Thanks Bryan, you have pointed me in the right direction.
TS_CODE script I used was from an older version than bokeh 2.4.1. By replacing it with what is shown here [Creating LaTeX labels — Bokeh 2.4.1 Documentation], it now works.
However, I see this section has fallen away in the latest documentation (2.4.3). I do hope support for
LatexLabel will continue or that it will be replaced with the ability to use latex in
Label as is the case with axis labels.
@GCru Latex / mathtext support is now built-in to Bokeh for many common cases:
And will be supported in even more places (e.g. built in
Label) will be present in Bokeh 3.0. That section was removed because we do not want to encourage any users to go down the complicated (and fragile) custom extension path if it is not necessary.
Hi Bryan, that is great news!
Thank you for all the work to add these extensions.