Skip to content

Commit 9eff9f5

Browse files
authored
Merge pull request #128 from WIAS-PDELib/feature/term_index
Single indexing of GridVisualizer + show multiple UnicodePlots without Term
2 parents 8a33e91 + 2a13636 commit 9eff9f5

4 files changed

Lines changed: 13 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [1.20.0] - 2026-04-30
4+
- a `GridVisualizer` can now be indexed with a single index
5+
- `UnicodePlots`: multiple plots are now displayed even without `Term` loaded, but only one by one
6+
37
## [1.19.1] - 2026-04-27
48
- several small fixes in `UnicodePlots` extension.
59
- fix in slice plotting: use `simplexgrid` constructor for the resulting grid to ensure a consistent grid.

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "GridVisualize"
22
uuid = "5eed8a63-0fb0-45eb-886d-8d5a387d12b8"
3-
version = "1.19.2"
3+
version = "1.20.0"
44
authors = ["Juergen Fuhrmann <juergen.fuhrmann@wias-berlin.de>", "Patrick Jaap <patrick.jaap@wias-berlin.de>"]
55

66
[deps]

ext/GridVisualizeUnicodePlotsExt.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
module GridVisualizeUnicodePlotsExt
3-
3+
44
Extension module for UnicodePlots.jl
55
"""
66
module GridVisualizeUnicodePlotsExt
@@ -24,7 +24,12 @@ function reveal(p::GridVisualizer, TP::Type{UnicodePlotsType})
2424
display(subplots[1][:figure])
2525
else
2626
if :Term Symbol.(Base.loaded_modules_array())
27-
@warn "A GridVisualizer with multiple UnicodePlots requires 'Term.jl' to be loaded: add Term.jl to your environment."
27+
@warn "A GridVisualizer with multiple UnicodePlots can only respect the desired layout if 'Term.jl' is loaded: add Term.jl to your environment and use it."
28+
29+
# plot figures one by one
30+
for subplot in subplots
31+
haskey(subplot, :figure) && display(subplot[:figure])
32+
end
2833
else
2934
# set missing figures
3035
for subplot in subplots

src/dispatch.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ $(SIGNATURES)
314314
315315
Return a SubVisualizer
316316
"""
317-
Base.getindex(p::GridVisualizer, i, j) = p.subplots[i, j]
317+
Base.getindex(p::GridVisualizer, i...) = p.subplots[i...]
318318

319319
"""
320320
$(SIGNATURES)

0 commit comments

Comments
 (0)