[Solved] How do I achieve a bubbleplot? [closed]


To achieve this you could use ggplot. Here an example:

require(ggplot2)

df <- data.frame(x = c(-2, -1.5, 1, 2, 3),
               y = c(-1, 0.8, 1, 1, 2),
               country = c("SWI", "FRA", "US", "UK", "NL"), size = c(15,12,20,4,7))


ggplot(df, aes(x = x, y = y)) + geom_point(aes(size = size), pch=1) +geom_text(aes(label=country),hjust=-0.5, vjust=0) + xlim(c(-3,4)) + scale_size_continuous(range = c(2,20))

enter image description here

solved How do I achieve a bubbleplot? [closed]