| plot_g_persp | R Documentation |
Creates a base R persp() 3D surface plot for g-function groups with d >= 2.
For d <= 1, produces a 2D scatter plot (same as plot_g_function()).
The surface is colored by contribution value using a blue-white-red scale.
Suitable for PDF and Word output where interactive plotly is not available.
plot_g_persp(
earth_result,
group_index,
theta = 30,
phi = 25,
response_idx = NULL
)
earth_result |
An object of class |
group_index |
Integer. Index of the g-function group (1-based, from
|
theta |
Numeric. Azimuthal rotation angle in degrees. Default 30. |
phi |
Numeric. Elevation angle in degrees. Default 25. |
response_idx |
Integer or |
Invisible NULL (base graphics). For d <= 1, returns a ggplot object.
result <- fit_earth(mtcars, "mpg", c("cyl", "disp", "hp", "wt"), degree = 2L)
plot_g_persp(result, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.