Skip to content

Commit

Permalink
changed axis limits for better perspective
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandopalafox committed Feb 5, 2024
1 parent 6a534ac commit 237081b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions experiments/tower_defense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,14 @@ function display_surface(ps, Ks)
ylabel = "r₂",
zlabel = "K",
title = "Stage 1 cost as a function of r \n priors = $(round.(ps, digits=2))",
limits = (nothing, nothing, (0.01, 1)),
)
Ks_min = minimum(filter(!isnan, Ks))
hmap = surface!(ax, rs, rs, Ks)
hmap = surface!(ax, rs, rs, Ks, colorrange = (0, 1))
Colorbar(fig[1, 2], hmap; label = "K", width = 15, ticksize = 15, tickalign = 1)
text!(ax, "$(round(ps[1], digits=2))", position = (0.9, 0.4, Ks_min), font = "Bold")
text!(ax, "$(round(ps[2], digits=2))", position = (0.1, 0.95, Ks_min), font = "Bold")
text!(ax, "$(round(ps[3], digits=2))", position = (0.2, 0.1, Ks_min), font = "Bold")
text!(ax, "$(round(ps[1], digits=2))", position = (0.9, 0.4, 0.01), font = "Bold")
text!(ax, "$(round(ps[2], digits=2))", position = (0.1, 0.95, 0.01), font = "Bold")
text!(ax, "$(round(ps[3], digits=2))", position = (0.2, 0.1, 0.01), font = "Bold")
fig
end

Expand Down

0 comments on commit 237081b

Please sign in to comment.