Basic-Acid basalts
Reference | |
Data | bulk |
Input | SiO2_wtp, K2O_wtp |
require('ggplot2'); classifydiag.basalts_k2o_sio2 <- function (wtp_data, ...){ ds <- selectNames(wtp_data, c("Name", "SiO2_wtp", "K2O_wtp")); pts <- data.frame(Name=ds$Name, X=ds$SiO2_wtp, Y=ds$K2O_wtp); marks <- data.frame(Label=c("Low-K", "Medium-K", "High-K", "Acid", "Basic"), X=c(60, 60, 60, 60, 55), Y=c(0.2, 1.2, 2.5, 3.8, 3.2)); limits <- c(50,65,0,4); lines <- data.frame(X1 = c(53, 57, 63, 53, 53, 53), Y1 = c(0, 0, 0, 0.5, 1.6, 2.6), X2 = c(53, 57, 63, 63, 63, 63), Y2 = c(2.6, 3.15, 4, 1.0, 2.3, 4)); labels <- c("SiO2", "K2O"); ret <- c(); ret$type <- "diagram"; ret$points <- pts; ret$limits <- limits; ret$marks <- marks; ret$lines <- lines; ret$labels <- labels; return(ret); }