From 5568658d634d11bb34462291442c9bc621939989 Mon Sep 17 00:00:00 2001 From: Hongyang Zhou Date: Wed, 22 Nov 2023 17:49:22 -0500 Subject: [PATCH] Fix compatibility issue with Makie 0.20 --- Project.toml | 2 +- ext/VlasiatorMakieExt/fullrecipe.jl | 2 +- ext/VlasiatorMakieExt/typerecipe.jl | 2 +- test/runtests.jl | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Project.toml b/Project.toml index 5566cfa2..6f8c1d04 100644 --- a/Project.toml +++ b/Project.toml @@ -30,7 +30,7 @@ VlasiatorMakieExt = "Makie" LaTeXStrings = "1.2" LazilyInitializedFields = "1.0" LazyGrids = "0.4, 0.5" -Makie = "0.19, 0.20" +Makie = "0.20" Parsers = "2.4" PrecompileTools = "1.0" RecipesBase = "1.1" diff --git a/ext/VlasiatorMakieExt/fullrecipe.jl b/ext/VlasiatorMakieExt/fullrecipe.jl index 98e700f9..7c7b8a52 100644 --- a/ext/VlasiatorMakieExt/fullrecipe.jl +++ b/ext/VlasiatorMakieExt/fullrecipe.jl @@ -203,7 +203,7 @@ function vdfvolume(meta::MetaVLSV, location::AbstractVector; species::String="pr plt = Makie.meshscatter!(ax, Vselect, color=log10.(fselect), marker=Makie.Rect3f(Makie.Vec3f(0), Makie.Vec3f(4*vmesh.dv[1])), colormap=cmap, - transparency=true, shading=false) + transparency=true, shading=Makie.NoShading) cbar = Makie.Colorbar(fig, plt, label="f(v)") diff --git a/ext/VlasiatorMakieExt/typerecipe.jl b/ext/VlasiatorMakieExt/typerecipe.jl index be4f28fd..43b44427 100644 --- a/ext/VlasiatorMakieExt/typerecipe.jl +++ b/ext/VlasiatorMakieExt/typerecipe.jl @@ -9,7 +9,7 @@ function Makie.convert_arguments(P::Makie.PointBased, meta::MetaVLSV, var::Strin end "Conversion for 2D plots." -function Makie.convert_arguments(P::Makie.SurfaceLike, meta::MetaVLSV, var::String, +function Makie.convert_arguments(P::Makie.GridBased, meta::MetaVLSV, var::String, axisunit::AxisUnit=EARTH, comp::Union{Symbol, Int}=0, normal::Symbol=:y, origin::AbstractFloat=0.0) diff --git a/test/runtests.jl b/test/runtests.jl index e4d2b360..f28d53ad 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -412,13 +412,13 @@ end var = "proton/vg_rho" fig, ax, plt = viz(meta1, var) - @test plt isa Combined + @test plt isa Plot{Vlasiator.viz, Tuple{MetaVLSV, String}} fig, ax, plt = viz(meta2, "vg_b_vol") - @test plt isa Combined + @test plt isa Plot{Vlasiator.viz, Tuple{MetaVLSV, String}} fig, ax, plt = viz(meta3, "proton/vg_rho") - @test plt isa Combined + @test plt isa Plot{Vlasiator.viz, Tuple{MetaVLSV, String}} fig, ax, plt = lines(meta1, var) @test plt isa Lines