data(Lifeboats)
attach(Lifeboats)
ternaryplot(
Lifeboats[,4:6],
pch = ifelse(side=="Port", 1, 19),
col = ifelse(side=="Port", "red", "blue"),
id = ifelse(men/total > 0.1, as.character(boat), NA),
prop.size = 2,
dimnames.position = "edge",
main = "Lifeboats on the Titanic"
)
legend(
0.7, 0.8,
legend = c("SIDE", "Port", "Starboard"),
pch = c(NA, 1, 19),
col = c("black", "red", "blue"),
)
Run the code above in your browser using DataLab