Plot a proportional symbols layer with colors based on qualitative data.
propSymbolsTypoLayer(spdf, df, spdfid = NULL, dfid = NULL, var, inches = 0.3, fixmax = NULL, symbols = "circle", border = "grey20", lwd = 1, var2, col = NULL, colNA = "white", legend.title.cex = 0.8, legend.values.cex = 0.6, legend.var.pos = "bottomleft", legend.var.title.txt = var, legend.values.rnd = 0, legend.var.style = "c", legend.var.frame = FALSE, legend.var2.pos = "topright", legend.var2.title.txt = var2, legend.var2.values.order = NULL, legend.var2.nodata = "no data", legend.var2.frame = FALSE, add = TRUE, k = NULL)
legendBarsSymbols, legendTypo, legendCirclesSymbols, legendSquaresSymbols, typoLayer, propSymbolsLayer
data("nuts2006") ## Example 1 plot(nuts0.spdf, col = "grey60",border = "grey20")nuts0.df$typo <- c(rep("A",10),rep("B",10),rep("C",10),rep("D",4)) propSymbolsTypoLayer(spdf = nuts0.spdf, df = nuts0.df, var = "pop2008", var2="typo")## Example 2 #Countries plot plot(nuts0.spdf, col = "grey60",border = "grey20", add = FALSE)nuts0.df$typo <- c(rep("A",10),rep("B",10),rep("C",10),rep("D",4)) nuts0.df$typo[1:3] <- NA nuts0.df$pop2008[4:6] <- NA propSymbolsTypoLayer(spdf = nuts0.spdf, df = nuts0.df, var = "pop2008", var2="typo", symbols = "circle", legend.var.pos = "topright", legend.var2.pos = "right", legend.var.title.txt = "Total\npopulation (2008)", legend.values.rnd = -3, legend.var2.title.txt = "Category", col = carto.pal(pal1 = "pastel.pal", 4), legend.var2.values.order = c("D", "A", "B", "C"), legend.var.style = "c")# Layout plot layoutLayer(title = "Countries Population & Color in Europe", sources = "UMS RIATE, 2015", scale = NULL, frame = TRUE, col = "black", coltitle = "white")