Rcssplot (version 1.0.0)

rect: Draw styled rectangles on a plot

Description

This is a wrapper for R's rect function. See R's documentation for graphics::rect for further details.

Usage

rect(xleft, ybottom, xright, ytop, Rcss = "default", Rcssclass = NULL, ...)

Arguments

xleft, ybottom, xright, ytop

vector of coordinates for rectangles' vertices

Rcss

style sheet object. Leave "default" to use a style defined via RcssSetDefaultStyle()

Rcssclass

character, style class

...

Further parameters, see documentation of graphics::rect

Examples

Run this code
# NOT RUN {
# draw rectangles on an existing plot
plot(c(0, 10), c(0, 10), type="n", xlab="", ylab="")
rect(4.5, 1, 5.5, 3)
rect(c(1, 7.5), c(6, 6), c(2.5, 9), c(8, 8))

# }

Run the code above in your browser using DataCamp Workspace