-5

How would I go about achieving a bubble plot like this on R?

Ioan
  • 13
  • 2
  • 1
    Beyond being too broad (and a generally poor q), it's also a duplicate - http://stackoverflow.com/questions/26757026/bubble-chart-with-ggplot2 – hrbrmstr Mar 24 '15 at 12:56

1 Answers1

2

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

Ruthger Righart
  • 4,799
  • 2
  • 28
  • 33