Title = 'Grain size', bty = 'n', cex = 0.8) Legend('topright', pt.cex = dat_cex, pch = 16, Title = 'Reflectance', bty = 'n', cex = 0.8) Legend('topleft', col = dat_col, pch = 16, MySizes <- seq(0.5, 2.4, length.out = sizeBins)īinnedSize <- cut(dat$grain_size, sizeBins)ītip = expression(paste(Fe, O, ' (wt%)')), MySpectrum <- viridisLite::viridis(spectrumBins)īinnedReflectance <- cut(dat$reflectance, spectrumBins) More sophisticated plots can be created, for example styling each point according to additional properties of the data, in a manner analogous to the standard plotting functions: par(mar = rep(0.3, 4))ĭat <- ame(sio2 = c(2, 4, 10, 20), Ternary diagrams are used to plot three dependent variables. TernaryArrows(c(20, 20, 60), c(30, 30, 40), length = 0.2, col = 'darkblue') A ternary diagram is a triangular coordinate system the edges of the triangle are the axes.
It is an extension to ggplot2 specifically for the plotting of ternary diagrams.Ternary diagrams are Barycentric plots w/ three variables, and, they are commonly used within the fields of chemistry, petrology, mineralogy, metallurgy, materials-science, genetics and game-theory, amongst others.
Plot ternary diagram software#
TernaryLines(list(c(100, 0, 0), middle_triangle), col = 'grey') ‘ggtern’ is a software package for the statistical computing language R. TernaryLines(list(c(0, 0, 100), middle_triangle), col = 'grey') TernaryLines(list(c(0, 100, 0), middle_triangle), col = 'grey') TernaryPolygon(middle_triangle, col = '#aaddfa', border = 'grey') Plot two stylised plots side by side, and plot data par(mfrow = c(1, 2), mar = rep(0.3, 4))