giovannellilab / geochem

Geochemistry pipeline for processing and visualising data from IRMS, IC and ICP-MS
https://github.com/giovannellilab/geochem
Other
0 stars 0 forks source link

Add ternary plot for He-Ar-N #23

Open guillecg opened 6 months ago

guillecg commented 6 months ago

Check PER22 data

alebastianoni commented 6 months ago

Guille, This is the code I have to reproduce to the best of my limited capabilities the ternary plot! hehehehe

ggtern::ggtern(data=data_gas,aes(x=He10,y=N2/100, z=Ar)) + geom_point(aes(fill=time), alpha=0.5, shape=21, size=6, stroke=0.3)+ geom_point(data = subset(data_gas, sampling %in% c("ASW")),fill="red",size=6, shape=21,alpha=.5,stroke=0.3) + geom_point(data = subset(data_gas, sampling %in% c("AIR")),fill="black",size=6, shape=21,alpha=.5,stroke=0.3) + geom_point(data = subset(data_gas, sampling %in% c("Arc_type1")),fill="grey",size=6, shape=21,alpha=.5,stroke=0.3) + geom_point(data = subset(data_gas, sampling %in% c("Arc_type2")),fill="grey",size=6, shape=21,alpha=.5,stroke=0.3) + scale_fill_viridis_d(direction = -1)+ labs( x = expression(He%%10), y = expression(N[2]/100), z = "Ar", fill="Sampling date")+ theme_hidemask()+ theme_bw(base_size = 16) + theme_hidegrid_major()+ theme_nogrid_minor()+ theme_nomask()

The end result after adding the connecting lines on Inkscape is this... ternary_gas_v3