Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. require(cowplot)
  2. require(ggplot2)
  3. x=1:50
  4. y=x^2
  5. z=rep(c("p","sp","n","sn","nt"),each=10)
  6. mydata= data.frame(x,y,z)
  7. plot1=ggplot(mydata,aes(x=x,y=y,group=z))+geom_point(aes(shape=z,color=z),size=1)+scale_shape_manual(values=c(19,1,19,17,17))+scale_color_manual(values=c("blue","black","red","blue","red"))
  8. plot2=ggplot(mydata,aes(x=x,y=y,group=z))+geom_point(aes(shape=z,color=z),size=3)+scale_shape_manual(values=c(19,1,19,17,17))+scale_color_manual(values=c("blue","black","red","blue","red"))
  9. plot3=ggplot(mydata,aes(x=x,y=y,group=z))+geom_point(aes(shape=z,color=z),size=5)+scale_shape_manual(values=c(19,1,19,17,17))+scale_color_manual(values=c("blue","black","red","blue","red"))
  10. plot4=ggplot(mydata,aes(x=x,y=y,group=z))+geom_point(aes(shape=z,color=z),size=7)+scale_shape_manual(values=c(19,1,19,17,17))+scale_color_manual(values=c("blue","black","red","blue","red"))
  11. plot_grid(plot1, plot2, plot1,plot1, align='h', labels=c('a', 'b',"c","d"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement