Skip to content

Commit 548f13b

Browse files
authored
plotting for MappedBasis (#104)
* Update plotting.jl * Update runtests.jl
1 parent 3cfa420 commit 548f13b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/plotting.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ end
1111
_plotgrid(_, P) = grid(P)
1212

1313
_plotgrid(::WeightedBasisLayouts, wP) = plotgrid(unweightedbasis(wP))
14+
_plotgrid(::MappedBasisLayout, P) = invmap(parentindices(P)[1])[plotgrid(demap(P))]
1415

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

test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,5 +634,7 @@ include("test_basisconcat.jl")
634634
@test wrep[1].args == (grid(wT), v[grid(wT)])
635635

636636
@test plotgrid(v) == plotgrid(u) == grid(T) == grid(wT) == _plotgrid(MemoryLayout(v), v) == _plotgrid(MemoryLayout(u), u)
637+
y = affine(0..1, x)
638+
@test plotgrid(T[y,:]) == (plotgrid(T) .+ 1)/2
637639
end
638640
end

0 commit comments

Comments
 (0)