Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. data<-read.csv("data.csv")
  2. xlim<-max(c(abs(min(data$x)),abs(max(data$x))))
  3. ylim<-max(c(abs(min(data$y)),abs(max(data$y))))
  4. data$Color<-as.character(data$Color)
  5. print(data)
  6. ggplot(data, aes(x = x, y = y, label = Group)) +
  7. geom_point(aes(size = size, colour = Group), show.legend = TRUE) +
  8. scale_color_manual(values=c(data$Color)) +
  9. geom_text(size = 4) +
  10. scale_size(range = c(5,15)) +
  11. scale_x_continuous(name="x", limits=c(xlim*-1-1,xlim+1))+
  12. scale_y_continuous(name="y", limits=c(ylim*-1-1,ylim+1))+
  13. theme_bw()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement