Last chance! 50% off unlimited learning
Sale ends in
legendPropTriangles(pos = "topleft", title.txt, var.txt, var2.txt,
title.cex = 0.8, cex = 1, values.cex = 0.6, var, var2, r, r2,
col = "red", col2 = "blue", frame = FALSE, values.rnd = 0,
style = "c")
data("nuts2006")
plot(nuts0.spdf)
box()
var <- round((nuts0.df$pop2008 / sum(nuts0.df$pop2008))*100,2)
var2 <- round((nuts0.df$gdppps2008 / sum(nuts0.df$gdppps2008))*100,2)
r <- sqrt(var)/2*1000000
r2 <- sqrt(var2)/2*1000000
legendPropTriangles(pos = "topright", var.txt = "population totale (habs)",
var2.txt = "pib (euros)", title.txt="PIB par habitant",
title.cex = 0.8, values.cex = 0.6, cex = 1,
var = var, var2 = var2, r = r, r2 = r2,
col="green", col2="yellow", frame=TRUE, values.rnd=2,
style="c")
Run the code above in your browser using DataLab