Description Usage Arguments Details Examples
Add secants to the previously added function.
1 | fun_secants(p, x0, x1 = NULL, mouse = FALSE)
|
p |
Plot as initialised by |
x0, x1 |
See details. |
mouse |
Update secant on mouse move. |
If a data object has a secants, then each object will be used to compute secant lines between two
points belonging to the function, additionally if updateOnMouseMove
is a property set to true in the object then
(x_{0},f(x_{1})) will be used as an anchored point and (x_{0},f(x_{1})) will be computed dynamically
based on the mouse abscissa.
Values for secants
list:
x0
the abscissa of the first point
x1
(optional if updateOnMouseMove
is set) the abscissa of the second point
mouse
(optional) if set to TRUE
x1
will be computed dynamically
based on the current position of the mouse.
1 2 3 4 | funplot() %>%
fun_add("x^2") %>%
fun_secants(x0 = 5, mouse = TRUE) %>%
fun_secants(x0 = 2, x1 = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.