
Last chance! 50% off unlimited learning
Sale ends in
Plot the response surface model using a contour plot
# S3 method for resp_surf
plot(
x,
xlab = NULL,
ylab = NULL,
resolution = 100,
bins = 10,
plot_theme = theme_metan(),
...
)
An object of class resp_surf
The label for the x and y axis, respectively. Defaults to original variable names.
The resolution of the contour plot. Defaults to 100. higher values produce high-resolution plots but may increase the computation time.
The number of bins shown in the plot. Defaults to 10
.
The graphical theme of the plot. Default is
plot_theme = theme_metan()
. For more details, see
theme
.
Currently not used
An object of class gg, ggplot
.
# 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