-
Notifications
You must be signed in to change notification settings - Fork 3
/
temp.jl
54 lines (46 loc) · 861 Bytes
/
temp.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using CairoMakie
using ColorSchemes
using TernaryDiagrams
using JLD2
a1 = load("test/data.jld2", "a1")
a2 = load("test/data.jld2", "a2")
a3 = load("test/data.jld2", "a3")
ws = Float64.(load("test/data.jld2", "mus"))
fig = Figure();
ax = Axis(fig[1, 1]);
ternarycontourf!(
ax,
a1,
a2,
a3,
ws;
levels = 10,
linewidth = 4,
color = nothing,
colormap = reverse(ColorSchemes.Spectral),
pad_data = true,
)
ternaryscatter!(
ax,
a1,
a2,
a3;
color = :black,
marker = :circle,
markersize = 15,
)
ternaryscatter!(
ax,
a1,
a2,
a3;
color = [get(reverse(ColorSchemes.Spectral), w, extrema(ws)) for w in ws],
marker = :circle,
markersize = 10,
)
ternaryaxis!(ax);
xlims!(ax, -0.2, 1.2)
ylims!(ax, -0.3, 1.1)
hidedecorations!(ax)
fig
Makie.FileIO.save("figs/test.png", fig)