Skip to content

Commit

Permalink
support multidimensional grids
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed May 5, 2021
1 parent 504a79a commit 3c34e3d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/plotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ _plotgrid(_, P) = grid(P)

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

_split_svec(x) = (x,)
_split_svec(x::AbstractArray{<:StaticVector{2}}) = (map(first,x), map(last,x))

@recipe function f(g::AbstractQuasiVector)
x = plotgrid(g)
x,g[x]
tuple(_split_svec(x)...,g[x])
end

@recipe function f(g::AbstractQuasiMatrix)
x = plotgrid(g)
x,g[x,:]
tuple(_split_svec(x)...,g[x,:])
end

2 comments on commit 3c34e3d

@dlfivefifty
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/36093

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.3 -m "<description of version>" 3c34e3d24d5f652c33dcc455cf064f310f10433d
git push origin v0.7.3

Please sign in to comment.