Ternary plots in GMT.jl

Interested also on how to do this with GMT.

Fyi, it is already possible to do something like it using TernaryPlots.jl, a package that seems to be at early stages:

The corresponding code is provided below:

using TernaryPlots

b = 0:0.01:0.3
c1 = (1 .- b).^3 .- 0.7^3
c2 = (1 .- 2*b).^2 .- 0.4^2
t1 = tern2cart.(1 .- b .- c1, b, c1)
t2 = tern2cart.(1 .- b .- c2, b, c2)

p = TernaryPlots.ternary_plot(title="TernaryPlots.jl",labels=(A="A", B="B", C="C"))
plot!(p, [t1...], lw=2, lc=:red)
plot!(p, [t2...], lw=2, lc=:blue)
1 Like