Skip to content

Commit 16009f6

Browse files
committed
reveal only existing subplots
1 parent 9cff0e3 commit 16009f6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ext/GridVisualizeUnicodePlotsExt.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ function reveal(p::GridVisualizer, ::Type{UnicodePlotsType})
2525
if !isdefined(Main, :Term)
2626
@warn "A GridVisualizer with multiple UnicodePlots requires 'Term.jl' to be loaded: add Term.jl to your environment."
2727
else
28-
grid_plot = UnicodePlots.gridplot(map(subplot -> subplot[:figure], subplots), layout = p.context[:layout])
28+
figures = [subplot[:figure] for subplot in subplots if haskey(subplot, :figure)]
29+
grid_plot = UnicodePlots.gridplot(figures, layout = p.context[:layout])
2930
display(grid_plot)
3031
end
3132
end

0 commit comments

Comments
 (0)