Some users like background colors, and it may be helpful to have grid lines
to read off e.g. probabilities from a Kaplan-Meier graph. Both things can be
controlled with this function. However, it mainly serves
plot.prodlim
.
stripes(xlim, ylim, col = "white", lwd = 1, gridcol = "gray77",
fill = "white", horizontal = NULL, vertical = NULL, border = "black",
xpd = FALSE)
Limits for the horizontal x-dimension. Defaults to par("usr")[1:2].
Limits for the vertical y-dimension.
Colors use for the stripes. Can be a vector of colors which are then repeated appropriately.
Line width
Color of grid lines
Color to fill the background rectangle given by par("usr").
Numerical values at which to show horizontal grid lines, and at which to change the color of the stripes.
Numerical values at which to show vertical grid lines.
If a fill color is provided, the color of the border around the background.
From help(par)
: A logical value or NA. If FALSE,
all plotting is clipped to the plot region, if TRUE, all plotting
is clipped to the figure region, and if NA, all plotting is clipped
to the device region. See also clip
.
# NOT RUN {
plot(0,0)
backGround(bg="beige",fg="red",vertical=0,horizontal=0)
plot(0,0)
stripes(col=c("yellow","green"),gridcol="red",xlim=c(-1,1),horizontal=seq(0,1,.1))
stripes(col=c("yellow","green"),gridcol="red",horizontal=seq(0,1,.1))
# }
Run the code above in your browser using DataLab