Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Makie #2853

Merged
merged 3 commits into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,9 @@ uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[deps.Libiconv_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778"
git-tree-sha1 = "c7cb1f5d892775ba13767a87c7ada0b980ea0a71"
uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531"
version = "1.16.1+1"
version = "1.16.1+2"

[[deps.LinearAlgebra]]
deps = ["Libdl", "libblastrampoline_jll"]
Expand Down
247 changes: 150 additions & 97 deletions docs/Manifest.toml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ Polynomials = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
TimesDates = "bdfc003b-8df8-5c39-adcd-3a9087f5df4a"

[compat]
CairoMakie = "0.10"
Literate = "≥2.9.0"
2 changes: 1 addition & 1 deletion examples/baroclinic_adjustment.jl
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ times = avg_b_timeseries.times

title = @lift "Buoyancy at t = " * string(round(times[$n] / day, digits=1)) * " days"

fig[1, 1:2] = Label(fig, title; textsize = 24, tellwidth = false, padding = (0, 0, -120, 0))
fig[1, 1:2] = Label(fig, title; fontsize = 24, tellwidth = false, padding = (0, 0, -120, 0))

frames = 1:length(times)

Expand Down
2 changes: 1 addition & 1 deletion examples/horizontal_convection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ ax_ζ = Axis(fig[4, 1];
ax_χ = Axis(fig[5, 1];
title = L"buoyancy dissipation, $κ |\mathbf{\nabla}b|^2 \, (L_x / {b_*}^5)^{1/2}$", axis_kwargs...)

fig[1, :] = Label(fig, title, textsize=24, tellwidth=false)
fig[1, :] = Label(fig, title, fontsize=24, tellwidth=false)

hm_s = heatmap!(ax_s, xc, zc, sₙ;
colorrange = (0, slim),
Expand Down
2 changes: 1 addition & 1 deletion examples/internal_wave.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ contourf!(ax, x, z, w;
extendhigh = :auto)

title = @lift "ωt = " * string(round(w_timeseries.times[$n] * ω, digits=2))
fig[1, 1] = Label(fig, title, textsize=24, tellwidth=false)
fig[1, 1] = Label(fig, title, fontsize=24, tellwidth=false)

# And, finally, we record a movie.
using Printf
Expand Down
4 changes: 2 additions & 2 deletions examples/kelvin_helmholtz_instability.jl
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ ax_KE = Axis(fig[3, :];
limits = ((0, t_final), (initial_eigenmode_energy, 1e-1)),
xlabel = "time")

fig[1, :] = Label(fig, title, textsize=24, tellwidth=false)
fig[1, :] = Label(fig, title, fontsize=24, tellwidth=false)

ω_lims = @lift (-maximum(abs, interior(ω_timeseries, :, 1, :, $n)) - 1e-16, maximum(abs, interior(ω_timeseries, :, 1, :, $n)) + 1e-16)
b_lims = @lift (-maximum(abs, interior(b_timeseries, :, 1, :, $n)) - 1e-16, maximum(abs, interior(b_timeseries, :, 1, :, $n)) + 1e-16)
Expand Down Expand Up @@ -487,7 +487,7 @@ ax_KE = Axis(fig[3, :];
limits = ((0, t_final), (initial_eigenmode_energy, 1e-1)),
xlabel = "time")

fig[1, :] = Label(fig, title, textsize=24, tellwidth=false)
fig[1, :] = Label(fig, title, fontsize=24, tellwidth=false)

hm_Ω = heatmap!(ax_Ω, xω, zω, Ωₙ; colorrange = (-1, 1), colormap = :balance)
Colorbar(fig[2, 2], hm_Ω)
Expand Down
2 changes: 1 addition & 1 deletion examples/ocean_wind_mixing_and_convection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ Colorbar(fig[3, 2], hm_S; label = "g / kg")
hm_νₑ = heatmap!(ax_νₑ, xT, zT, νₑₙ; colormap = :thermal, colorrange = νₑlims)
Colorbar(fig[3, 4], hm_νₑ; label = "m s⁻²")

fig[1, 1:4] = Label(fig, title, textsize=24, tellwidth=false)
fig[1, 1:4] = Label(fig, title, fontsize=24, tellwidth=false)

# And now record a movie.

Expand Down
2 changes: 1 addition & 1 deletion examples/shallow_water_Bickley_jet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ hm_ω′ = heatmap!(ax_ω′, x, y, ω′, colormap = :balance)
Colorbar(fig[2, 4], hm_ω′)

title = @lift @sprintf("t = %.1f", times[$n])
fig[1, 1:4] = Label(fig, title, textsize=24, tellwidth=false)
fig[1, 1:4] = Label(fig, title, fontsize=24, tellwidth=false)

# Finally, we record a movie.

Expand Down
2 changes: 1 addition & 1 deletion examples/tilted_bottom_boundary_layer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ Colorbar(fig[3, 2], hm_v; label = "m s⁻¹")

times = collect(ds["time"])
title = @lift "t = " * string(prettytime(times[$n]))
fig[1, :] = Label(fig, title, textsize=20, tellwidth=false)
fig[1, :] = Label(fig, title, fontsize=20, tellwidth=false)

# Finally, we record a movie.

Expand Down
2 changes: 1 addition & 1 deletion examples/two_dimensional_turbulence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ heatmap!(ax_ω, xω, yω, ω; colormap = :balance, colorrange = (-2, 2))
heatmap!(ax_s, xs, ys, s; colormap = :speed, colorrange = (0, 0.2))

title = @lift "t = " * string(round(times[$n], digits=2))
Label(fig[1, 1:2], title, textsize=24, tellwidth=false)
Label(fig[1, 1:2], title, fontsize=24, tellwidth=false)

# Finally, we record a movie.

Expand Down
4 changes: 2 additions & 2 deletions validation/barotropic_gyre/visualize_barotropic_gyre.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ function visualize_barotropic_gyre(filepath)
wireframe!(ax, Sphere(Point3f(0), 0.99f0), show_axis=false)
surface!(ax, x[n], y[n], z[n], color=var, colormap=:balance) #, colorrange=clims[n])
rotate_cam!(ax.scene, (0, 3π/4, 0))
fig[2, 2 + 3*(n-1)] = Label(fig, statenames[n], textsize = 50) # put names in center
fig[2, 2 + 3*(n-1)] = Label(fig, statenames[n], fontsize = 50) # put names in center
end

supertitle = fig[0, :] = Label(fig, plot_title, textsize=50)
supertitle = fig[0, :] = Label(fig, plot_title, fontsize=50)

record(fig, output_prefix * ".mp4", iterations, framerate=30) do i
@info "Animating iteration $i/$(iterations[end])..."
Expand Down
4 changes: 2 additions & 2 deletions validation/cubed_sphere_surface_gravity_waves/animate_face.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ wireframe!(ax, Sphere(Point3f(0), 0.99f0), show_axis=false)
sf = surface!(ax, xc, yc, zc, color=η, colormap=:balance, colorrange=(-0.01, 0.01))
rotate_cam!(ax.scene, (3π/4, π/6, 0))
# zoom!(ax.scene, (0, 0, 0), 5, false)
# fig[2, 2 + 3*(n-1)] = Label(fig, statenames[n], textsize = 50) # put names in center
# fig[2, 2 + 3*(n-1)] = Label(fig, statenames[n], fontsize = 50) # put names in center

cb1 = fig[1, 2] = Colorbar(fig, sf, label="η′", width=30)

supertitle = fig[0, :] = Label(fig, plot_title, textsize=50)
supertitle = fig[0, :] = Label(fig, plot_title, fontsize=50)

record(fig, "cubed_sphere_waves.mp4", iterations, framerate=60) do i
@info "Animating iteration $i/$(iterations[end])..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ zoom!(ax.scene, (0, 0, 0), 8, false)

cb1 = fig[1, 2] = Colorbar(fig, sf, label="sea surface height η′ (m)", width=30)

supertitle = fig[0, :] = Label(fig, plot_title, textsize=50)
supertitle = fig[0, :] = Label(fig, plot_title, fontsize=50)

record(fig, "surface_gravity_waves_on_a_cubed_sphere.mp4", iterations, framerate=15) do i
@info "Animating iteration $i/$(iterations[end])..."
Expand Down Expand Up @@ -88,7 +88,7 @@ end

# cb1 = fig[1, 2] = Colorbar(fig, sf, label="u-velocity (m/s)", width=30)

# supertitle = fig[0, :] = Label(fig, plot_title, textsize=50)
# supertitle = fig[0, :] = Label(fig, plot_title, fontsize=50)

# record(fig, "surface_gravity_waves_on_a_cubed_sphere_u.mp4", iterations[1:20], framerate=15) do i
# @info "Animating iteration $i/$(iterations[end])..."
Expand Down Expand Up @@ -124,7 +124,7 @@ end

# cb1 = fig[1, 2] = Colorbar(fig, sf, label="v-velocity (m/s)", width=30)

# supertitle = fig[0, :] = Label(fig, plot_title, textsize=50)
# supertitle = fig[0, :] = Label(fig, plot_title, fontsize=50)

# record(fig, "surface_gravity_waves_on_a_cubed_sphere_v.mp4", iterations[1:20], framerate=15) do i
# @info "Animating iteration $i/$(iterations[end])..."
Expand Down
2 changes: 1 addition & 1 deletion validation/mesoscale_turbulence/baroclinic_adjustment.jl
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ rotate_cam!(ax_c.scene, (π/24, -π/6, 0))
title = @lift(string("Buoyancy and tracer concentration at t = ",
prettytime(slice_files[1]["timeseries/t/" * string($iter)])))

fig[0, :] = Label(fig, title, textsize=30)
fig[0, :] = Label(fig, title, fontsize=30)


iterations = parse.(Int, keys(slice_files[1]["timeseries/t"]))
Expand Down
2 changes: 1 addition & 1 deletion validation/mesoscale_turbulence/eddying_channel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ rotate_cam!(ax_ζ.scene, (π/24, -π/6, 0))
title = @lift(string("Buoyancy, vertical vorticity, and zonally-averaged u at t = ",
prettytime(zonal_file["timeseries/t/" * string($iter)])))

fig[0, :] = Label(fig, title, textsize=30)
fig[0, :] = Label(fig, title, fontsize=30)

display(fig)

Expand Down
16 changes: 8 additions & 8 deletions validation/mesoscale_turbulence/zonally_averaged_channel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ fig, ax, hm = heatmap(yc * 1e-3, zc, interior(∇_q_timeseries)[1, :, :, which_i
colormap=:balance, colorrange=(-1e-7, 1e-7),
axis=(xlabel="y", ylabel="z", xticklabelsize=20, yticklabelsize=20, xlabelsize=25, ylabelsize=25))
Colorbar(fig[1, 2], hm, ticklabelsize=20)
fig[0, :] = Label(fig, "∇⋅q", textsize=30)
fig[0, :] = Label(fig, "∇⋅q", fontsize=30)
xlims!(y_limits[1], y_limits[2])
ylims!(z_limits[1], z_limits[2])
display(fig)
Expand All @@ -343,7 +343,7 @@ fig, ax, hm = heatmap(yv * 1e-3, zv, interior(vb_timeseries)[1, :, :, which_iter
colormap=:balance, colorrange=(-2e-5, 2e-5),
axis=(xlabel="y", ylabel="z", xticklabelsize=20, yticklabelsize=20, xlabelsize=25, ylabelsize=25))
Colorbar(fig[1, 2], hm, ticklabelsize=20)
fig[0, :] = Label(fig, "v'b'", textsize=30)
fig[0, :] = Label(fig, "v'b'", fontsize=30)
xlims!(y_limits[1], y_limits[2])
ylims!(z_limits[1], z_limits[2])
display(fig)
Expand All @@ -352,7 +352,7 @@ fig, ax, hm = heatmap(yw * 1e-3, zw, interior(wb_timeseries)[1, :, :, which_iter
colormap=:balance, colorrange=(-1e-6, 1e-6),
axis=(xlabel="y", ylabel="z", xticklabelsize=20, yticklabelsize=20, xlabelsize=25, ylabelsize=25))
Colorbar(fig[1, 2], hm, ticklabelsize=20)
fig[0, :] = Label(fig, "w'b'", textsize=30)
fig[0, :] = Label(fig, "w'b'", fontsize=30)
xlims!(y_limits[1], y_limits[2])
ylims!(z_limits[1], z_limits[2])
display(fig)
Expand All @@ -363,7 +363,7 @@ fig, ax, hm = heatmap(yc * 1e-3, zc, interior(b)[1, :, :],
# colormap=:balance, colorrange=(-1e-7, 1e-7),
axis=(xlabel="y", ylabel="z", xticklabelsize=20, yticklabelsize=20, xlabelsize=25, ylabelsize=25))
Colorbar(fig[1, 2], hm, ticklabelsize=20)
fig[0, :] = Label(fig, "b", textsize=30)
fig[0, :] = Label(fig, "b", fontsize=30)
xlims!(y_limits[1], y_limits[2])
ylims!(z_limits[1], z_limits[2])
display(fig)
Expand All @@ -373,7 +373,7 @@ fig, ax, hm = heatmap(yu * 1e-3, zu, interior(u_timeseries)[1, :, :, which_itera
colormap=:balance, colorrange=(-0.5, 0.5),
axis=(xlabel="y", ylabel="z", xticklabelsize=20, yticklabelsize=20, xlabelsize=25, ylabelsize=25))
Colorbar(fig[1, 2], hm, ticklabelsize=20)
fig[0, :] = Label(fig, "u", textsize=30)
fig[0, :] = Label(fig, "u", fontsize=30)
# xlims!(y_limits[1], y_limits[2])
# ylims!(z_limits[1], z_limits[2])
display(fig)
Expand All @@ -384,7 +384,7 @@ fig, ax, hm = heatmap(yv * 1e-3, zv, interior(v_timeseries)[1, :, :, which_itera
colormap=:balance, colorrange=(-0.1, 0.1),
axis=(xlabel="y", ylabel="z", xticklabelsize=20, yticklabelsize=20, xlabelsize=25, ylabelsize=25))
Colorbar(fig[1, 2], hm, ticklabelsize=20)
fig[0, :] = Label(fig, "v", textsize=30)
fig[0, :] = Label(fig, "v", fontsize=30)
# xlims!(y_limits[1], y_limits[2])
# ylims!(z_limits[1], z_limits[2])
display(fig)
Expand All @@ -395,7 +395,7 @@ fig, ax, hm = heatmap(yw * 1e-3, zw, interior(w_timeseries)[1, :, :, which_itera
colormap=:balance, colorrange=(-1e-4, 1e-4),
axis=(xlabel="y", ylabel="z", xticklabelsize=20, yticklabelsize=20, xlabelsize=25, ylabelsize=25))
Colorbar(fig[1, 2], hm, ticklabelsize=20)
fig[0, :] = Label(fig, "w", textsize=30)
fig[0, :] = Label(fig, "w", fontsize=30)
# xlims!(y_limits[1], y_limits[2])
# ylims!(z_limits[1], z_limits[2])
display(fig)
Expand All @@ -411,7 +411,7 @@ fig, ax, hm = heatmap(yw * 1e-3, zw, interior(b_z)[1, :, :],
colormap=:curl, colorrange=(-5e-4, 5e-4),
axis=(xlabel="y", ylabel="z", xticklabelsize=20, yticklabelsize=20, xlabelsize=25, ylabelsize=25))
Colorbar(fig[1, 2], hm, ticklabelsize=20)
fig[0, :] = Label(fig, "∂b/∂z", textsize=30)
fig[0, :] = Label(fig, "∂b/∂z", fontsize=30)
xlims!(y_limits[1], y_limits[2])
ylims!(z_limits[1], z_limits[2])
display(fig)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@ sphere_continents!(ax_v)
rotate_cam!(ax_v.scene, (π/8, π/6, 0))

plot_title = @lift "t = " * ti($iter)
supertitle = sphere_fig[0, 3:4] = Label(sphere_fig, plot_title, textsize=40)
supertitle = sphere_fig[0, 3:4] = Label(sphere_fig, plot_title, fontsize=40)

#v_title = sphere_fig[0, 5] = Label(sphere_fig, "Ocean meridional velocity", textsize=20)
#T_title = sphere_fig[0, 2] = Label(sphere_fig, "Ocean temperature", textsize=20)
#v_title = sphere_fig[0, 5] = Label(sphere_fig, "Ocean meridional velocity", fontsize=20)
#T_title = sphere_fig[0, 2] = Label(sphere_fig, "Ocean temperature", fontsize=20)

display(sphere_fig)

Expand Down
2 changes: 1 addition & 1 deletion validation/solid_body_rotation/solid_body_rotation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function plot_zonal_average_solid_body_rotation(filepath)
theory = lines!(ax, solid_body_rotation.(φ), φ, color=:black)
simulation = lines!(ax, zonal_average_u, φ, color=:blue)

supertitle = fig[0, :] = Label(fig, plot_title, textsize=30)
supertitle = fig[0, :] = Label(fig, plot_title, fontsize=30)

leg = Legend(fig, [theory, simulation], ["U cos(φ)", "Simulation"], markersize = 7,
halign = :right, valign = :top, bgcolor = :transparent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function visualize_solid_body_tracer_advection(filepath)
heatmap!(ax, var)
end

supertitle = fig[0, :] = Label(fig, plot_title, textsize=30)
supertitle = fig[0, :] = Label(fig, plot_title, fontsize=30)

record(fig, output_prefix * ".mp4", iterations, framerate=30) do i
@info "Animating iteration $i/$(iterations[end])..."
Expand Down