This document describes the four line style arguments that can be used in R graphics: line width, line end style, line join style, and line type. It explains that these arguments can be set in the plot() function and defines the parameters for each argument, including their default values and the options that can be specified. Examples are provided using plot() to illustrate how each line style argument can be set.
This document describes the four line style arguments that can be used in R graphics: line width, line end style, line join style, and line type. It explains that these arguments can be set in the plot() function and defines the parameters for each argument, including their default values and the options that can be specified. Examples are provided using plot() to illustrate how each line style argument can be set.
This document describes the four line style arguments that can be used in R graphics: line width, line end style, line join style, and line type. It explains that these arguments can be set in the plot() function and defines the parameters for each argument, including their default values and the options that can be specified. Examples are provided using plot() to illustrate how each line style argument can be set.
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, specifed 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, specifed 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, specifed 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 specifed with strings of 2, 4, 6, or 8 characters (non-zero hexadecimal characters, 19 and af) 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
Mental Math: How to Develop a Mind for Numbers, Rapid Calculations and Creative Math Tricks (Including Special Speed Math for SAT, GMAT and GRE Students)
Calculus Made Easy: Being a Very-Simplest Introduction to Those Beautiful Methods of Reckoning Which are Generally Called by the Terrifying Names of the Differential Calculus and the Integral Calculus