Skip to content

Commit

Permalink
Fix volume! and volumesclices!
Browse files Browse the repository at this point in the history
  • Loading branch information
felixcremer committed Oct 16, 2023
1 parent f732528 commit 6b5fc71
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ext/DimensionalDataMakie.jl
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ for (f1, f2) in _paired(:plot => :volume, :volume, :volumeslices)
end
function Makie.$f1!(axis, A::AbstractDimArray{<:Any,3}; x=nothing, y=nothing, z=nothing, attributes...)
replacements = _keywords2dimpairs(x, y, z)
_, args, _ = _volume3(A, attributes, replacements)
_, _, args, _ = _volume3(A, attributes, replacements)
return Makie.$f2!(axis, args...; attributes...)
end
end
Expand Down
18 changes: 9 additions & 9 deletions test/plotrecipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -251,27 +251,27 @@ using CairoMakie: CairoMakie as M
M.surface!(ax, A2ab)
fig, ax, _ = M.series(A2ab)
M.series!(ax, A2ab)
@test_broken fig, ax, _ = M.series(A2ab; labeldim=:a)
@test_broken M.series!(ax, A2ab; labeldim=:a)
@test_broken fig, ax, _ = M.series(A2ab; labeldim=:b)
@test_broken M.series!(ax, A2ab;labeldim=:b)
fig, ax, _ = M.series(A2ab; labeldim=:a)
M.series!(ax, A2ab; labeldim=:a)
#fig, ax, _ = M.series(A2ab; labeldim=:b)
#M.series!(ax, A2ab;labeldim=:b)

# 3d
A3 = rand(X(7), Z(10), Y(5))
A3m = rand([missing, (1:7)...], X(7), Z(10), Y(5))
A3m[3] = missing
fig, ax, _ = M.volume(A3)
@test_broken M.volume!(ax, A3)
@test_broken fig, ax, _ = M.volume(A3m)
@test_broken M.volume!(ax, A3m)
M.volume!(ax, A3)
fig, ax, _ = M.volume(A3m)
M.volume!(ax, A3m)
fig, ax, _ = M.volumeslices(A3)
@test_broken M.volumeslices!(ax, A3)
M.volumeslices!(ax, A3)
#fig, ax, _ = M.volumeslices(A3m)
#M.volumeslices!(ax, A3m)
# x/y/z can be specified
A3abc = DimArray(rand(10, 10, 7), (:a, :b, :c); name=:stuff)
fig, ax, _ = M.volume(A3abc; x=:c)
fig, ax, _ = M.volumeslices(A3abc; x=:c)
fig, ax, _ = M.volumeslices(A3abc; z=:a)
@test_broken M.volumeslices!(ax, A3abc;z=:a)
M.volumeslices!(ax, A3abc;z=:a)
end

0 comments on commit 6b5fc71

Please sign in to comment.