Skip to content

Commit 3c34e3d

Browse files
committed
support multidimensional grids
1 parent 504a79a commit 3c34e3d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/plotting.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ _plotgrid(_, P) = grid(P)
1212

1313
plotgrid(g) = _plotgrid(MemoryLayout(g), g)
1414

15+
_split_svec(x) = (x,)
16+
_split_svec(x::AbstractArray{<:StaticVector{2}}) = (map(first,x), map(last,x))
17+
1518
@recipe function f(g::AbstractQuasiVector)
1619
x = plotgrid(g)
17-
x,g[x]
20+
tuple(_split_svec(x)...,g[x])
1821
end
1922

2023
@recipe function f(g::AbstractQuasiMatrix)
2124
x = plotgrid(g)
22-
x,g[x,:]
25+
tuple(_split_svec(x)...,g[x,:])
2326
end

0 commit comments

Comments
 (0)