R/generateRLineTypes.R

#' Generate a plot of line types which R knows about.
#' @description Generate line types available in R.
#' @author Alboukadel Kassambara <alboukadel.kassambara@@gmail.com>
#' @seealso \code{\link{generateRPointShapes}}
#' @references http://www.sthda.com
#' @examples
#' 
#' #The code to generate line types available in R
#' generateRLineTypes()
#' 
#' @export generateRLineTypes
generateRLineTypes<-function(){
  oldPar<-par()
  par(font=2, mar=c(0,0,0,0))
  plot(1, pch="", ylim=c(0,6), xlim=c(0,0.7),  axes=FALSE,xlab="", ylab="")
  for(i in 0:6) lines(c(0.3,0.7), c(i,i), lty=i, lwd=3)
  text(rep(0.1,6), 0:6, labels=c("0.'blank'", "1.'solid'", "2.'dashed'", "3.'dotted'",
                                 "4.'dotdash'", "5.'longdash'", "6.'twodash'"))
  par(mar=oldPar$mar,font=oldPar$font )
}
YTLogos/easyGgplot2 documentation built on May 3, 2019, 9:03 p.m.