plot_fun: Plot a mathematical function (enhanced version of curve)

View source: R/graph_utils.R

plot_funR Documentation

Plot a mathematical function (enhanced version of curve)

Description

Plot a 2d mathematical function y = f(x)

Usage

plot_fun(
  f = function(x) x + 1,
  from = 0,
  to = 5,
  points = 100,
  col = "black",
  cartesian_plane = TRUE,
  cartesian_plane_col = "black",
  grid_at_x = NULL,
  grid_at_y = NULL,
  add = FALSE,
  ...
)

Arguments

f

a function

from

domain (plotting) starting point

to

domain (plotting) ending point

points

number of points

col

the function color

cartesian_plane

wheter to add a cartesian plane ...

cartesian_plane_col

... and its color

grid_at_x

at_x param for add_grid

grid_at_y

at_y param for add_grid

add

if TRUE the function is added within an existing graph

...

other params given to plot

Value

Nothing. As a side effect the plot of pch.

Examples


plot_fun()


lbraglia/lbmisc documentation built on June 14, 2025, 6:44 p.m.