metan (version 1.2.1)

plot.resp_surf: Plot the response surface model

Description

Plot the response surface model using a contour plot

Usage

# S3 method for resp_surf
plot(x, xlab = NULL, ylab = NULL, region = TRUE, resolution = 100, ...)

Arguments

x

An object of class resp_surf

xlab

The label for the x axis

ylab

The label for the y axis

region

Logical argument indicating whether regions between contour lines should be colored.

resolution

The resolution of the contour plot. Defaults to 100. higher values produce high-resolution plots but may increase the computation time.

...

Other arguments passed from contourplot function. See contourplot for more details.

Value

An object of class trellis.

Examples

Run this code
# NOT RUN {
library(metan)
# A small toy example

df <- data.frame(
 expand.grid(x = seq(0, 4, by = 1),
             y = seq(0, 4, by = 1)),
 z = c(10, 11, 12, 11, 10,
       14, 15, 16, 15, 14,
       16, 17, 18, 17, 16,
       14, 15, 16, 15, 14,
       10, 11, 12, 11, 10)
)
mod <- resp_surf(df, x, y, resp = z)
plot(mod)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab