plot3D: plot3D

View source: R/plot3D.R

plot3DR Documentation

plot3D

Description

Plot a function with 2 input values in 3D based on ggplot2 & rayshader package.

Usage

plot3D(
  f = function(x, y) x^0.2 * y^0.2,
  x.min = 0,
  y.min = 0,
  x.max = 10,
  y.max = 10,
  n = 100,
  low = "blue",
  high = "red",
  title = NULL,
  legend.title = "f",
  xlab = "x",
  ylab = "y"
)

Arguments

f

The function, which will be plotted in 3D (function(x, y) x^0.2*y^0.2)

x.min

Lower limit of x-axis (0)

y.min

Lower limit of y-axis (0)

x.max

Upper limit of x-axis (10)

y.max

Upper limit of y-axis (10)

n

Number of points in rows and columns (100)

low

Colour of the lowest value ("blue")

high

Colour of the highest value ("red")

title

Title of the plot (f as expression)

legend.title

Title of the legend ("f")

xlab

Title of the x-axis ("x")

ylab

Title of th y-axis ("y")

Value

3D figure based on rayshader. overview_print

Examples

plot3D()

MarcellGranat/granatlib documentation built on July 9, 2023, 6:08 a.m.