Skip to contents

Plots a mathematical function as a path.

Usage

add_function_plot(
  scene,
  fun,
  xlim = c(-5, 5),
  n_points = 100,
  color = "#FFFFFF",
  stroke_width = 2,
  opacity = 1
)

Arguments

scene

A Scene object

fun

Function to plot (R function)

xlim

X-axis limits as c(min, max)

n_points

Number of points to sample

color

Line color

stroke_width

Line width

opacity

Opacity

Value

The Scene object (invisibly) for piping