Skip to content

Commit

Permalink
Merge pull request #38 from WIAS-PDELib/feature/glmakie-label-regions
Browse files Browse the repository at this point in the history
GLMakie: Annotate cell/boundary region color bar
  • Loading branch information
jpthiele authored Nov 27, 2024
2 parents 86a488e + 6f7d4f3 commit e5a3c6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Added

- `gridplot` with `PyPlot` has now a color bar with annotation `boundary regions`
- `gridplot` with `GLMakie` and `PyPlot` now annotates the color bars with `boundary regions` and `cell regions`

## [1.9.0] - 2024-11-25

Expand Down
4 changes: 4 additions & 0 deletions src/makie.jl
Original file line number Diff line number Diff line change
Expand Up @@ -538,13 +538,15 @@ function makescene_grid(ctx)
limits = (0.5, ncol + 0.5),
ticks = 1:ncol,
width = 15,
label = "cell regions",
)
GL[1, 3] = XMakie.Colorbar(
ctx[:figure];
colormap = XMakie.cgrad(ctx[:bcmap]; categorical = true),
limits = (0.5, nbcol + 0.5),
ticks = 1:nbcol,
width = 15,
label = "boundary regions",
)
elseif ctx[:colorbar] == :horizontal
GL[2, 1] = XMakie.Colorbar(
Expand All @@ -553,13 +555,15 @@ function makescene_grid(ctx)
limits = (1, ncol),
height = 15,
vertical = false,
label = "cell regions",
)
GL[3, 1] = XMakie.Colorbar(
ctx[:figure];
colormap = XMakie.cgrad(ctx[:bcmap]; categorical = true),
limits = (1, nbcol),
height = 15,
vertical = false,
label = "boundary regions",
)
end
end
Expand Down

0 comments on commit e5a3c6b

Please sign in to comment.