Skip to content

Commit 97d5f0f

Browse files
committed
makie utils
1 parent c44b46b commit 97d5f0f

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ uuid = "49aed396-608e-4c3f-b6d6-a749216c9ea7"
33
authors = ["Beforerr <[email protected]> and contributors"]
44
version = "1.0.0-DEV"
55

6+
[deps]
7+
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
8+
69
[compat]
710
julia = "1"
811

src/beforerr.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
module beforerr
22

33
# Write your package code here.
4+
export add_labels!
5+
6+
include("utils/makie.jl")
47

58
end

src/utils/makie.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using CairoMakie
2+
3+
function add_label!(layout, label; position=TopLeft())
4+
Label(layout[1, 1, position], label,
5+
font=:bold,
6+
padding = (0, 40, 0, 0),
7+
halign=:right)
8+
end
9+
10+
function add_labels!(layouts; labels)
11+
for (label, layout) in zip(labels, layouts)
12+
add_label!(layout, label)
13+
end
14+
end

0 commit comments

Comments
 (0)