diff options
author | Urbain Vaes <urbain@vaes.uk> | 2023-09-21 18:37:50 +0200 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2023-09-21 18:37:50 +0200 |
commit | 9b33046355238f56cda18493b8c757db736516a4 (patch) | |
tree | 09835e1ef8e0479b6ffd3236a76ff360b180bfa8 /figures.jl | |
parent | 06ebedae24304577f71880412ba33d0ecf0d10a4 (diff) |
Add worked example
Diffstat (limited to 'figures.jl')
-rw-r--r-- | figures.jl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/figures.jl b/figures.jl new file mode 100644 index 0000000..ed9b70f --- /dev/null +++ b/figures.jl @@ -0,0 +1,17 @@ +using Plots +using QuadGK +using LaTeXStrings + +V(x) = 1 - cos(x) +η = .1 + +# plot(title="Invariant distribution of perturbed OL") +plot(title="") +for η ∈ [0, .5, 1, 2] + ρ(q) = exp(-V(q)) * quadgk(y -> exp(V(q + y) - η*y), 0, 2π)[1] + Z = quadgk(ρ, - π, π)[1] + plot!(q -> ρ(q) / Z, -π, π, label=L"\eta = " * string(η), lw=2) +end +plot!(xlims = (-π, π), grid=false, ylims=(0, .4), framestyle=:box) +savefig("figures/invariant_perturbed_ol.pdf") + |