3

I would like to use latex with the Plotly backend. Look in this example: Even the x-axis and y-axis log scales are not formatted properly! Do you know how to do that?

Best,

v.

using Plots, LaTeXStrings
plotlyjs()
x =  10 .^ LinRange(-5,5,10)

plot(x, 1 ./ x, yaxis=:log, xaxis=:log, m = 2, xlabel="x", label="1/x",ylabel="f(x)")
plot!(x, 10 ./ x, m=2,label="10/x")
plot!(x, 1 ./ (x.^2), m=2, label=L"f(x)=$1/x^2$")
savefig("./test.png")

test

varantir
  • 6,624
  • 6
  • 36
  • 57

1 Answers1

2

Seems to work with the gr() backend, so I expect LaTeXString is not supported by the plotlyjs() backend.

enter image description here

René
  • 4,594
  • 5
  • 23
  • 52