Skip to content

Commit 9785f0b

Browse files
pjaapchmerdon
andauthored
Add unicode multiplot (#120)
* UnicodePlots: Enable multiplot layout by reducing the resolution * UnicodePlots: add autoscale to scalarplot 2D * UnicodePlots: Adjust total resolutions to make multiplots more consistent * UnicodePlots: use normal text color where useful * first draft of 2d vectorplot with UnicodePlots * improved vector plot * UnicodePlots: Make scalarplot 2d slightly larger * use colormap for arrow coloring * use ansi_color * old arrow directions were correct * provisoric colorbar for vectorplot * removed debug line * UnicodePlots: handle clear=true correctly in 1D Scalarplot * much nicer vectorplot with outside colorbar * vectorplot colorbar now changes with ctx[:colormap], ctx[:vscale] changes arrowtypes * reveal only existing subplots * Show placeholders for incomplete multiplots * Reduce sizing of plots a bit further it now matches the resolution in the terminal on minimal zoom * fix names and labels in scalarplot * Respect scaling and xlimits * Comply to plot_multiscene interface * Test UnicodePlots * Add UnicodePlots image to README * coordinate limits in vectorplot, less padding and shorter coordinate limits in gridplot * check only if plot_multiscene is crashing * Update pre-commit * restored old padding in gridplot, added new border kwarg to toggle the border styles in UnicodePlots * Update unicode plot image * moved legend and limits to outside labels, removed padding in gridplots * Update unicode plot image --------- Co-authored-by: chmerdon <christian.merdon@wias-berlin.de>
1 parent 941ea1d commit 9785f0b

9 files changed

Lines changed: 286 additions & 65 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ repos:
1616
hooks:
1717
- id: gitleaks
1818
- repo: https://github.com/fredrikekre/runic-pre-commit
19-
rev: v2.0.1
19+
rev: v2.2.0
2020
hooks:
2121
- id: runic
2222
- repo: https://github.com/codespell-project/codespell
23-
rev: v2.4.1
23+
rev: v2.4.2
2424
hooks:
2525
- id: codespell

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

3-
## [1.18.2] - 2026-04-21
3+
## [1.19.0] - 2026-XX-XX
4+
- `UnicodePlots` does support multiplots if the package `Term` is loaded.
45
- Add colorbar for cell regions in 2D `gridplot!` with `Py[thon]Plot`
56

67
## [1.18.0] - 2026-04-15

Project.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GridVisualize"
22
uuid = "5eed8a63-0fb0-45eb-886d-8d5a387d12b8"
3+
version = "1.19.0"
34
authors = ["Juergen Fuhrmann <juergen.fuhrmann@wias-berlin.de>", "Patrick Jaap <patrick.jaap@wias-berlin.de>"]
4-
version = "1.18.2"
55

66
[deps]
77
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
@@ -64,6 +64,7 @@ Printf = "1.6"
6464
PyPlot = "2"
6565
PythonPlot = "1"
6666
StaticArrays = "1"
67+
Term = "2.0.8"
6768
Triangulate = "2, 3"
6869
UnicodePlots = "3"
6970
VTKView = "0.1,0.2"
@@ -75,8 +76,9 @@ ExtendableGrids = "cfc395e8-590f-11e8-1f13-43a2532b2fa8"
7576
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
7677
PlutoVista = "646e1f28-b900-46d7-9d87-d554eb38a413"
7778
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
79+
Term = "22787eb5-b846-44ae-b979-8e399b8463ab"
7880
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
7981
Triangulate = "f7e6ffb2-c36d-4f8f-a77e-16e897189344"
8082

8183
[targets]
82-
test = ["CairoMakie", "ExtendableGrids", "Pkg", "PlutoVista", "PyPlot", "Test", "Triangulate"]
84+
test = ["CairoMakie", "ExtendableGrids", "Pkg", "PlutoVista", "PyPlot", "Term", "Test", "Triangulate", "UnicodePlots"]

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,18 @@ and all plotting functions will do nothing.
135135
| | PyPlot/PythonPlot | Makie | PlutoVista | Plots | VTKView | UnicodePlots |
136136
|----------------|--------------------|-------|------------|-------|---------|--------------|
137137
| scalarplot, 1D | y | y | y,i | y | y | y |
138-
| vectorplot, 1D | y | y | y | y | y | |
138+
| vectorplot, 1D | y | y | y | y | y | n |
139139
| gridplot, 1D | y | y | y | y | | y |
140140
| scalarplot, 2D | y | y | y | (y) | y,i | y |
141-
| vectorplot, 2D | y | y | y | y | |
142-
| streamplot, 2D | y | y | p | n | |
141+
| vectorplot, 2D | y | y | y | y | | y
142+
| streamplot, 2D | y | y | p | n | | n
143143
| gridplot, 2D | y | y,i | y | (y) | y,i | y |
144-
| scalarplot, 3D | y | y,i | y,i | n | y,i | |
145-
| gridplot, 3D | y | y,i | y,i | n | y,i | |
146-
| vectorplot, 3D | p | p | p | n | | |
147-
| streamplot, 3D | | p | p | n | | |
148-
| movie | n | y | n | y | | |
149-
| triangulateio | y | y | n | n | n | |
144+
| scalarplot, 3D | y | y,i | y,i | n | y,i | n |
145+
| gridplot, 3D | y | y,i | y,i | n | y,i | n |
146+
| vectorplot, 3D | p | p | p | n | | n |
147+
| streamplot, 3D | | p | p | n | | n |
148+
| movie | n | y | n | y | | n |
149+
| triangulateio | y | y | n | n | n | n |
150150

151151
## Sample output
152152

@@ -166,6 +166,10 @@ and all plotting functions will do nothing.
166166
### [VTKView](https://github.com/j-fu/VTKView.jl) (experimental):
167167
![](https://github.com/WIAS-PDELib/GridVisualize.jl/blob/main/docs/src/assets/multiscene_vtkview.png?raw=true")
168168

169+
### [UnicodePlots](https://github.com/JuliaPlots/UnicodePlots.jl) (experimental):
170+
![](https://github.com/WIAS-PDELib/GridVisualize.jl/blob/main/docs/src/assets/multiscene_unicodeplots.png?raw=true")
171+
172+
169173
## vscode
170174
Plotting into the plot pane of Visual Studio Code is working. Here, you can use CairoMakie or WGLMakie as backend. This works only with the mutating functions, i.e. you should use something like
171175
```
113 KB
Loading

0 commit comments

Comments
 (0)