1 A guide to the line style arguments for R graphics R has four line style arguments: line width, line end style, line join style, and line type. These graphical arguments and their parameters are described within the documentation for the par() function of the graphics package. All four arguments can be set in plot(). Only line width and line type can be set in gplot(). plot(c(0,1), c(0,0), type="l", axes=FALSE, xlab=NA, ylab=NA, lwd=0.5) lwd positive number line width may be set to any positive number (default = 1) plot(c(0,1), c(0,0), type="l", axes=FALSE, xlab=NA, ylab=NA, lwd=1) plot(c(0,1), c(0,0), type="l", axes=FALSE, xlab=NA, ylab=NA, lwd=3.5) lend line end style three styles, specified by either their integer or name (default = "round") plot(c(0,1), c(0,0), type="l", axes=FALSE, xlab=NA, ylab=NA, lwd=5, lend=0) plot(c(0,1), c(0,0), type="l", axes=FALSE, xlab=NA, ylab=NA, lwd=5, lend=1) plot(c(0,1), c(0,0), type="l", axes=FALSE, xlab=NA, ylab=NA, lwd=5, lend=2) 0 "round" 1 "butt" 2 "square" round butt square Melissa Clarkson March 2010 R version 2.10.1 document version 2 2 ljoin line join style three styles, specified by either their integer or name (default = "round") plot(c(0, 0, 4, 0, 0), c(0, 1, 1.5, 2, 3), type="l", lwd=5, axes=FALSE, xlab=NA, ylab=NA, ljoin="mitre") 0 "round" 1 "mitre" 2 "bevel" plot(c(0, 0, 4, 0, 0), c(0, 1, 1.5, 2, 3), type="l", lwd=5, axes=FALSE, xlab=NA, ylab=NA, ljoin="round") plot(c(0, 0, 4, 0, 0), c(0, 1, 1.5, 2, 3), type="l", lwd=5, axes=FALSE, xlab=NA, ylab=NA, ljoin="bevel") 3 lty line type seven pre-set styles, specified by either their integer or name (default = "solid") 0 "blank" 1 "solid" 2 "dashed" 3 "dotted" 4 "dotdash" 5 "longdash" 6 "twodash" plot(c(0,1), c(0,0), type="l", axes=FALSE, xlab=NA, ylab=NA, lty=1) plot(c(0,1), c(0,0), type="l", axes=FALSE, xlab=NA, ylab=NA, lty=2) plot(c(0,1), c(0,0), type="l", axes=FALSE, xlab=NA, ylab=NA, lty=3) plot(c(0,1), c(0,0), type="l", axes=FALSE, xlab=NA, ylab=NA, lty=4) plot(c(0,1), c(0,0), type="l", axes=FALSE, xlab=NA, ylab=NA, lty=5) plot(c(0,1), c(0,0), type="l", axes=FALSE, xlab=NA, ylab=NA, lty=6) plot(c(0,1), c(0,0), type="l", axes=FALSE, xlab=NA, ylab=NA, lty=0) patterns of on?/?off can also be specified with strings of 2, 4, 6, or 8 characters (non-zero hexadecimal characters, 1–9 and a–f) the pre-set styles are "dashed" = "44", "dotted" = "13", "dotdash" = "1343", "longdash" = "73", "twodash" = "2262" plot(c(0,1), c(0,0), type="l", axes=FALSE, xlab=NA, ylab=NA, lty="24") plot(c(0,1), c(0,0), type="l", axes=FALSE, xlab=NA, ylab=NA, lty="1342") string