create plot1~4 R code, in the form of ex: plot1 <- function{}