For this ternary the only thing that you need to change are the axis... K is divided by 10 and Na by 400
gigg_tkn_duchi<-ggtern(data=subset(gigg_temp, tk %in% c("tkn")),aes(x=k/10,y=na/400, z=(sqrt(mg)))) +
geom_point(size=1,shape=22,fill="black",stroke=.3) +
scale_shape_manual(values=c(4,21:25)) +
scale_fill_viridis(discrete=T, option="inferno")+
tern_limit(T=1.15,L=1.15,R=1.15)+
geom_text(mapping = aes(label = as.factor(temp)),
color="black", size = 2.5, hjust=0.5, vjust = -1) +
guides(fill = guide_legend(override.aes=list(shape=21)))+
labs( x = "K/10",
y = "Na/400",
z = expression(sqrt(Mg)),
fill="samples")+
For this ternary the only thing that you need to change are the axis... K is divided by 10 and Na by 400 gigg_tkn_duchi<-ggtern(data=subset(gigg_temp, tk %in% c("tkn")),aes(x=k/10,y=na/400, z=(sqrt(mg)))) + geom_point(size=1,shape=22,fill="black",stroke=.3) +
scale_shape_manual(values=c(4,21:25)) +
scale_fill_viridis(discrete=T, option="inferno")+
tern_limit(T=1.15,L=1.15,R=1.15)+
geom_text(mapping = aes(label = as.factor(temp)), color="black", size = 2.5, hjust=0.5, vjust = -1) + guides(fill = guide_legend(override.aes=list(shape=21)))+ labs( x = "K/10", y = "Na/400", z = expression(sqrt(Mg)), fill="samples")+
geom_line() +
theme_hidemask()+ theme_bw(base_size = 25) + theme_hidegrid_major()+ theme_nogrid_minor()+ theme_nomask()
gigg_tkn2_duchi<-ggtern(data=subset(gigg_temp, tk %in% c("tkn")),aes(x=k/10,y=na/400, z=(sqrt(mg)))) + geom_point(size=1,shape=22,fill="black",stroke=.3) +
scale_shape_manual(values=c(4,21:25)) +
scale_fill_viridis(discrete=T, option="inferno")+
tern_limit(T=1.15,L=1.15,R=1.15)+
geom_text(mapping = aes(label = as.factor(temp)), color="black", size = 2.5, hjust=0.5, vjust = -1) + guides(fill = guide_legend(override.aes=list(shape=21)))+ labs( x = "K/10", y = "Na/400", z = expression(sqrt(Mg)), fill="samples")+
geom_line() +
theme_hidemask()+ theme_bw(base_size = 25) + theme_hidegrid_major()+ theme_nogrid_minor()+ theme_nomask()
gigg_base_duchi<-gigg_tkn2_duchi + geom_point(data = subset(gigg_temp, tk %in% c("tkm")),size=1, shape=22,fill="black",stroke=.3) + geom_text(data = subset(gigg_temp, tk %in% c("tkm")), mapping = aes(label = as.factor(temp)), color="black", size = 2.5, hjust=0.5, vjust = 2) + annotate("text", label = "Fully Equilibrated", x = 0.2, y = 0.8,z=0.2, size=6,alpha=.5, fontface = "bold") + annotate("text", label = "Partially Equilibrated", x = 0.2, y = 0.225,z=0.2, size=6,alpha=.5, fontface = "bold") + annotate("text", label = "Immature Waters", x = 0.2, y=0.05,z=0.2, size=6,alpha=.5, fontface = "bold")
The end result is this:![ternary_cations_duchi95_290523](https://github.com/giovannellilab/geochem/assets/92443165/f47f1962-6dc0-475a-b870-3e20b10d2cd7)