plot_3d: Plot a z = f(x,y) function

View source: R/graph_utils.R

plot_3dR Documentation

Plot a z = f(x,y) function

Description

Plot a z = f(x,y) function

Usage

plot_3d(
  f = NULL,
  xrange = c(-1, 1),
  yrange = c(-1, 1),
  points = 50,
  contour = FALSE,
  ...
)

Arguments

f

a f(x,y) function

xrange

x domain

yrange

y domain

points

number of points

contour

if TRUE make a contour plot instead of 3d plot

Examples

fun <- function(x, y) x^2 + y^2
par(mfrow = c(1,2))
plot_3d(fun)
plot_3d(fun, contour = TRUE)


lbraglia/lbmisc documentation built on April 29, 2024, 11:27 a.m.