gg_curve: Draw a curve of a function

Description Usage Arguments Examples

Description

Draw a line corresponding to a function expression. This implements [ggplot2::geom_path()] given a tibble of range [from, to, n].

Usage

1
2
gg_curve(expr, from = NULL, to = NULL, n = 101, xname = "x",
  xlab = xname, ylab = NULL, args = list(), ...)

Arguments

expr

same argument as [curve()]. 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 lower bound of the x-axis

to

the upper bound of the x-axis

n

the number of x values to be evaluated

xname

character; argument of the function in expr, the name of the x axis

xlab

label of the x-axis

ylab

label of the y-axis

args

list of the additional argument of the function

...

Additional arguments in drawing function expr

Examples

1
gg_curve(sqrt(1 + x), from = 1, to = 10)

ygeunkim/goodgraphic documentation built on July 1, 2019, 1:37 a.m.