Guest User

Untitled

a guest
Jan 20th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. library(ggplot2)
  2. library(gridExtra)
  3. u <- c(1.0968145, 0.2566922, 2.6884111, 2.3855156, 0.8794000, 2.4317190)
  4. v <- c(-0.3252739, 0.9596294, -1.4270491, 0.7009061, 0.3631149, 1.8298008)
  5. w <- c(1, 0, 1, 1, 1, 2)
  6. df1 <- data.frame(u, v, w)
  7. p1 <- ggplot(df1, aes(x=u, y=v, color=w )) + geom_point(show.legend = FALSE)
  8. u <- c(0.9827588, 2.2715139, 1.0160009, -1.0461050, 0.0208908, 2.5948499)
  9. v <- c(1.6068334, 0.7113232, 2.6927960, 3.4466515, 0.7541632, -0.2872779)
  10. w <- c(0, 1, 0, 0, 0, 1))
  11. df2 <- data.frame(u, v, w)
  12. p2 <- ggplot(df2, aes(x=u, y=v, color=w )) + geom_point(show.legend = FALSE)
  13. grid.arrange(p1, p2)
Add Comment
Please, Sign In to add comment