From f34d9ffa1f6c21c490e755fb8dadb8c2aaa9a601 Mon Sep 17 00:00:00 2001 From: Alberto Mercurio Date: Tue, 1 Oct 2024 15:45:14 +0200 Subject: [PATCH] Reduce figures size in Documentation --- docs/src/tutorials/logo.md | 6 +++--- docs/src/tutorials/lowrank.md | 2 +- docs/src/users_guide/steadystate.md | 2 +- docs/src/users_guide/time_evolution/solution.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/src/tutorials/logo.md b/docs/src/tutorials/logo.md index ac39523e..b68386bc 100644 --- a/docs/src/tutorials/logo.md +++ b/docs/src/tutorials/logo.md @@ -83,7 +83,7 @@ wig = wigner(ψ, xvec, yvec, g = 2) Finally, we plot the Wigner function using the `heatmap` function from the `CairoMakie` package. ```@example logo -fig = Figure(size = (500, 500), figure_padding = 0) +fig = Figure(size = (250, 250), figure_padding = 0) ax = Axis(fig[1, 1]) heatmap!(ax, xvec, yvec, wig', colormap = :RdBu, interpolate = true, rasterize = 1) hidespines!(ax) @@ -120,7 +120,7 @@ And the Wigner function becomes more uniform: ```@example logo wig = wigner(sol.states[end], xvec, yvec, g = 2) -fig = Figure(size = (500, 500), figure_padding = 0) +fig = Figure(size = (250, 250), figure_padding = 0) ax = Axis(fig[1, 1]) img_wig = heatmap!(ax, xvec, yvec, wig', colormap = :RdBu, interpolate = true, rasterize = 1) @@ -197,7 +197,7 @@ img = set_color_julia.(X, Y, wig_normalized, α1, α2, α3, Ref(cmap1), Ref(cmap Finally, we plot the Wigner function with the custom colormap. ```@example logo -fig = Figure(size = (500, 500), figure_padding = 0, backgroundcolor = :transparent) +fig = Figure(size = (250, 250), figure_padding = 0, backgroundcolor = :transparent) ax = Axis(fig[1, 1], backgroundcolor = :transparent) image!(ax, img', rasterize = 1) hidespines!(ax) diff --git a/docs/src/tutorials/lowrank.md b/docs/src/tutorials/lowrank.md index 42a100bd..030446dd 100644 --- a/docs/src/tutorials/lowrank.md +++ b/docs/src/tutorials/lowrank.md @@ -141,7 +141,7 @@ Plot the results m_me = real(mesol.expect[3, :]) / Nx / Ny m_lr = real(lrsol.expvals[3, :]) / Nx / Ny -fig = Figure(size = (800, 400), fontsize = 15) +fig = Figure(size = (500, 350), fontsize = 15) ax = Axis(fig[1, 1], xlabel = L"\gamma t", ylabel = L"M_{z}", xlabelsize = 20, ylabelsize = 20) lines!(ax, tl, m_lr, label = L"LR $[M=M(t)]$", linewidth = 2) lines!(ax, tl, m_me, label = "Fock", linewidth = 2, linestyle = :dash) diff --git a/docs/src/users_guide/steadystate.md b/docs/src/users_guide/steadystate.md index 74164c7d..ab06406a 100644 --- a/docs/src/users_guide/steadystate.md +++ b/docs/src/users_guide/steadystate.md @@ -103,7 +103,7 @@ sol_me = mesolve(H, ψ0, tlist, c_op_list, e_ops=e_ops, progress_bar=false) exp_me = real(sol_me.expect[1, :]) # plot the results -fig = Figure(size = (800, 400), fontsize = 15) +fig = Figure(size = (500, 350), fontsize = 15) ax = Axis(fig[1, 1], title = L"Decay of Fock state $|10\rangle$ in a thermal environment with $\langle n\rangle=2$", xlabel = "Time", diff --git a/docs/src/users_guide/time_evolution/solution.md b/docs/src/users_guide/time_evolution/solution.md index dae69ff0..efaea742 100644 --- a/docs/src/users_guide/time_evolution/solution.md +++ b/docs/src/users_guide/time_evolution/solution.md @@ -66,7 +66,7 @@ we can plot the resulting expectation values: using CairoMakie CairoMakie.enable_only_mime!(MIME"image/svg+xml"()) -fig = Figure() +fig = Figure(size = (500, 350)) ax = Axis(fig[1, 1], xlabel = L"t") lines!(ax, times, expt1, label = L"\langle 0 | \rho(t) | 0 \rangle") lines!(ax, times, expt2, label = L"\langle 1 | \rho(t) | 1 \rangle")