Skip to content

Commit

Permalink
update figure
Browse files Browse the repository at this point in the history
  • Loading branch information
kongdd committed Jul 12, 2024
1 parent 8794921 commit cd387f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ using GLMakie
using MakieLayers
using Ipaper

set_seed(2)
label_tag(xs) = map(x -> "($x)", xs)

x = 2:11
Expand All @@ -42,13 +43,13 @@ axs, plts = imagesc!(fig, rand(4, 4, 12), layout=(4, 3), byrow=true,
flags = letters.(1:16) |> label_tag
add_texts!(axs, flags, fontsize=20, 0.02, 0.98, align=(0, 1))

labels = ["Drought", "Flood", "ALL"]
labels = ["Hello", "World", "Makie.jl"]
add_row_labels!(fig, labels, fontsize=20, gap=5)

labels = ["scale = 1", "scale = 2", "scale = 3", "scale = 4"]
add_col_labels!(fig, labels, fontsize=20, gap=5)

# add a title for this figure
# Title
Label(fig[-1, :], "MakieLayers.imagesc (λ, °C, m³ s⁻¹)", font=:bold, fontsize=32, color=:blue)
rowgap!(fig.layout, 1, 5)
fig
Expand Down
Binary file modified docs/Figure1_imagesc_facet_grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs/ex_facet_grid.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using GLMakie
using MakieLayers
using Ipaper

set_seed(2)

# letters(i) = string('a' + i - 1)
begin
Expand All @@ -19,15 +19,15 @@ begin
flags = letters.(1:16) |> label_tag
add_texts!(axs, flags, fontsize=20, 0.02, 0.98, align=(0, 1))

labels = ["Drought", "Flood", "ALL"]
labels = ["Hello", "World", "Makie.jl"]
add_row_labels!(fig, labels, fontsize=20, gap=5)

labels = ["scale = 1", "scale = 2", "scale = 3", "scale = 4"]
add_col_labels!(fig, labels, fontsize=20, gap=5)

# add a title for this figure
# Title
Label(fig[-1, :], "MakieLayers.imagesc (λ, °C, m³ s⁻¹)", font=:bold, fontsize=32, color=:blue)
rowgap!(fig.layout, 1, 5)
fig
# save("Figure1_imagesc_facet_grid.png", fig)
save("./docs/Figure1_imagesc_facet_grid.png", fig)
end

0 comments on commit cd387f4

Please sign in to comment.