Hello,
I have two data sets that I would like to represent as a 3-simplex. My goal is to plot the first 3 dimensions as a ternary diagram with TernaryDiagrams.jl and represent the fourth dimension with a color gradient. I would also like to denote the two datasets with a different marker shape. I am having trouble getting the axis labels to display, the marker to change, and the colorbar to display. Here is what I have so far:
using Makie
using GLMakie
using TernaryDiagrams
using Distributions
using ColorSchemes
fig = Figure();
ax = Axis(fig[1, 1]);
ternaryaxis!(ax; labelx = "1", labely = "2", labelz = "3");
data1 = rand(Dirichlet([5,1,1,10]), 10)'
data2 = rand(Dirichlet([1,5,1,1]), 10)'
ternaryscatter!(
ax,
data1[:,1],
data1[:,2],
data1[:,3],
color = [get(ColorSchemes.Spectral, w, extrema(data1[:,4])) for w in data1[:,4]],
marker = :circle,
markersize = 20
)
ternaryscatter!(
ax,
data2[:,1],
data2[:,2],
data2[:,3],
color = [get(ColorSchemes.Spectral, w, extrema(data2[:,4])) for w in data2[:,4]],
marker = :triangle,
markersize = 20
)
fig
Any help would be greatly appreciated.