fork download
  1. op <- par()
  2.  
  3. par(mfrow = c(2, 2))
  4. plot(rnorm(10),
  5. rnorm(10),
  6. col = gl(2, 5),
  7. pch = as.integer(gl(2, 5)))
  8. plot(rnorm(10),
  9. rnorm(10),
  10. col = gl(2, 5),
  11. pch = as.integer(gl(2, 5)))
  12. plot(rnorm(10),
  13. rnorm(10),
  14. col = gl(2, 5),
  15. pch = as.integer(gl(2, 5)))
  16.  
  17. par(xaxt = "n", yaxt = "n", bty = "n")
  18. plot(1, xlab = "", ylab = "")
  19. legend(
  20. "left",
  21. c("Group A", "Group B"),
  22. pch = 1:2,
  23. col = 1:2,
  24. ncol = 2
  25. )
  26.  
  27. ## At end of plotting, reset to previous settings:
  28. par(op)
Success #stdin #stdout #stderr 0.33s 40628KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Warning messages:
1: In par(op) : graphical parameter "cin" cannot be set
2: In par(op) : graphical parameter "cra" cannot be set
3: In par(op) : graphical parameter "csi" cannot be set
4: In par(op) : graphical parameter "cxy" cannot be set
5: In par(op) : graphical parameter "din" cannot be set
6: In par(op) : graphical parameter "page" cannot be set