Hello,
I’m trying to produce a 3D surface plot in R, and I would like to use superscripts, subscripts and greek letters in the plot title and axis labels.
I am using the following code:
p <- plot_ly(x = x_vec, y = y_vec, z = z_martix, type="surface" ) %>% layout(title = '<br>x<sup>2</sup> x<sub>2</sub> Γ', scene = list(xaxis = list(title = 'x<sup>2</sup> x<sub>2</sub> Γ'), yaxis = list(title = "y"), zaxis = list(title = "z") ))
I noticed that while superscript works in both the title and the axis label, subscript works only in the title. In addition, the capital greek letter gamma (whose html entity is Γ
) is displayed as "&Gamma
"; in the title, and not displayed at all in the axis label.
Any suggestion?
Thanks.