I want to know what is the general (can be used for backend Plotly,GR,Makie,PlotlyJS) / easiest way to change the scale from standard integer:
-5,-4,…,0,1,2,…
to pi-scale: -π/2. -π/4, 0,…,π/4,π/2,π,3π/2,2π
this is my code:
using Plots, LaTeXStrings
gr()
f(x) = sin.(1/x)
#f(x) = (x^3 - 1) / (x-1)
annotate!([(30.3,23.3, ("x", 10, :black)),
(3.03,933.07, ("y", 10, :black))])
println("x \t sin 1/πx")
for N in 1:10:550
g = sin.(1 / (pi*N))
println("$N \t $g ")
end
plot(f,-10,10, label=L"\sin \frac{1}{x}", legend=:outertop)
plot!([0], seriestype="vline", color=:green, label="")
plot!([0], seriestype="hline", color=:green, label="")