The @time
is irrelevant. I think using
statements cannot be inside the same begin
end
block where you use them macros (edited).
julia> begin
using GLMakie,LaTeXStrings, MathTeXEngine
GLMakie.activate!()
scatter_data = [1,2,3,4,5,6,7,8]
x=1:8
fig = Figure(backgroundcolor=:snow2)
axis = Axis(fig[1,1], xlabel="Example scatter", title=L"\mathbb{Z}")
scatter!(axis, x, scatter_data)
display(fig)
end
ERROR: LoadError: UndefVarError: `@L_str` not defined
in expression starting at REPL[3]:10
julia> begin
using GLMakie,LaTeXStrings, MathTeXEngine
end
julia> begin
GLMakie.activate!()
scatter_data = [1,2,3,4,5,6,7,8]
x=1:8
fig = Figure(backgroundcolor=:snow2)
axis = Axis(fig[1,1], xlabel="Example scatter", title=L"\mathbb{Z}")
scatter!(axis, x, scatter_data)
display(fig)
end
GLMakie.Screen(...)
You will have to time them separately and then add the times.
julia> t1 = @elapsed begin
using GLMakie, LaTeXStrings, MathTeXEngine
end
0.0034929
julia> t2 = @elapsed begin
GLMakie.activate!()
scatter_data = [1,2,3,4,5,6,7,8]
x=1:8
fig = Figure(backgroundcolor=:snow2)
axis = Axis(fig[1,1], xlabel="Example scatter", title=L"\mathbb{Z}")
scatter!(axis, x, scatter_data)
display(fig)
end
0.0995245
julia> t = t1 + t2 # seconds
0.10301740000000001