gcurve: Draw function curves

Description Usage Arguments

View source: R/gplots.R

Description

Draws a curve corresponding to a function over the interval [from, to]. gcurve can plot also an expression in the variable xname, default x.

Usage

1
2
3
4
5
6
7
gcurve(expr, from = NULL, to = NULL, n = 101, add = FALSE, type = "l",
  xname = "x", xlab = xname, ylab = NULL, log = NULL, xlim = NULL,
  ..., grid = TRUE, col.grid = "grey90", col.acc = "white")

## S3 method for class 'function'
gplot(x, y = 0, to = 1, from = y, xlim = NULL,
  ylab = NULL, grid = TRUE, col.grid = "grey90", col.acc = "white", ...)

Arguments

expr

The name of a function, or a call or an expression written as a function of x which will evaluate to an object of the same length as x.

from

the range over which the function will be plotted.

to

the range over which the function will be plotted.

n

integer; the number of x values at which to evaluate.

add

logical; if TRUE add to an already existing plot; if NA start a new plot taking the defaults for the limits and log-scaling of the x-axis from the previous plot. Taken as FALSE (with a warning if a different value is supplied) if no graphics device is open.

type

plot type: see plot.default.

xname

character string giving the name to be used for the x axis.

xlab

labels and graphical parameters can also be specified as arguments. See ‘Details’ for the interpretation of the default for log.

For the "function" method of plot, ... can include any of the other arguments of curve, except expr.

ylab

labels and graphical parameters can also be specified as arguments. See ‘Details’ for the interpretation of the default for log.

For the "function" method of plot, ... can include any of the other arguments of curve, except expr.

log

labels and graphical parameters can also be specified as arguments. See ‘Details’ for the interpretation of the default for log.

For the "function" method of plot, ... can include any of the other arguments of curve, except expr.

xlim

NULL or a numeric vector of length 2; if non-NULL it provides the defaults for c(from, to) and, unless add = TRUE, selects the x-limits of the plot – see plot.window.

grid

logical; if TRUE, a background grid will be drawn

col.grid

grid color

col.acc

grid accent color

x

a ‘vectorizing’ numeric R function.

y

alias for from for compatibility with plot


raredd/plotr documentation built on Nov. 13, 2018, 7:05 a.m.