Learn R Programming

DescTools (version 0.99.7)

Canvas: Canvas for Geometric Plotting

Description

This is just a wrapper for creating an empty plot with suitable defaults for plotting geometric shapes.

Usage

Canvas(xlim = NULL, ylim = xlim, xpd=par("xpd"), mar=c(5.1,5.1,5.1,5.1), asp = 1, ...)

Arguments

xlim, ylim
the xlims and ylims for the plot. Default is c(-1, 1).
xpd
expand drawing area, defaults to par("xpd").
mar
set margins. Defaults to c(5.1,5.1,5.1,5.1).
asp
numeric, giving the aspect ratio y/x. (See plot.window for details. Default is 1.
...
additional arguments are passed to the plot() command.

Details

The plot is created with these settings: asp = 1, xaxt = "n", yaxt = "n", xlab = "", ylab = "", frame.plot = FALSE.

Examples

Run this code
Canvas(7)
text(0, 0, "Hello world!", cex=5)

Run the code above in your browser using DataLab