Skip to contents

Draws a curve corresponding to a function over the interval [from, to] in an interactive plot using 'Chart.js'.

Usage

# S3 method for class '`function`'
plotjs(x, from = 0, to = 1, ylab = NULL, ...)

Arguments

x

The name of a function.

from

the lower limit of the range over which the function will be plotted.

to

the upper limit of the range over which the function will be plotted.

ylab

a label for the y axis, defaults to the name of the function specified in x.

...

arguments passed to other methods

Examples

plotjs(qnorm)
plotjs(sin, -pi, 2 * pi)