Latex in PlotlyView

Description of the limitation and why it is relevant to address

As a developer, I want to make use of Latex formatting in VIKTOR PlotlyView so that I can label the visualization with symbols as they are usually defined (e.g. greek letters, subscripts and equations).

Plotly already supports Latex, see Latex in Python. But for some reason the VIKTOR PlotlyResult(fig.to_json()) seems to kill the Latex formatting and simply show the unformatted code, e.g. as ‘%var_{sub}%’.

Submitter proposed design (optional)

That VIKTOR PlotlyResult(fig.to_json()) format Latex strings similar to pure Plotly fig.show().

Current workarounds

You could use unicode instead of Latex. But unicode has several limitations compared to Latex. For instance, unicode doesn’t include subscripts of all letters.

So now I just write in plain text ‘var_sub’, which isn’t that satisfying.

Hi Rasmus,

Thank you for the feature request. Our frontend uses the JavaScript Plotly library, which I think requires some additional libraries to be loaded in order to display Latex correctly. I will check with our FE team to see if we can address this.

Regards,

Raoul

Hi Rasmus,

With the latest platform release Latex should be supported.

Regards,

Raoul

1 Like