Skip to content

jl-pkgs/MakieLayers.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MakieLayers.jl for personal usage

Stable Dev CI Codecov

Dongdong Kong

Installation

using Pkg
Pkg.add(url="https://github.com/jl-pkgs/MakieLayers.jl")
# ] add https://github.com/jl-pkgs/MakieLayers.jl

Functions

  • imagesc: inspired by the MATLAB version
  • ncl_colors: 270 NCL colors

Examples

using GLMakie
using MakieLayers
using Ipaper

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

x = 2:11
y = 2:11
fig = Figure(; size=(600, 650))

axs, plts = imagesc!(fig, rand(4, 4, 12), layout=(4, 3), byrow=true, 
  fun_axis=rm_ticks!,
  colorrange=(0, 1), gap=(0, 0, 15))

## add flags
flags = letters.(1:16) |> label_tag
add_texts!(axs, flags, fontsize=20, 0.02, 0.98, align=(0, 1))

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)

# Title
Label(fig[-1, :], "MakieLayers.imagesc (λ, °C, m³ s⁻¹)", font=:bold, fontsize=32, color=:blue)
rowgap!(fig.layout, 1, 5)
fig

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages