Learn R Programming

slouch (version 2.1.5)

plot.slouch: Plot Grid Search

Description

Graphical plot of parameter space traversed by the grid search.

Usage

# S3 method for slouch
plot(x, theta = 30, phi = 30, expand = 0.5, shade = 0.75, ...)

Arguments

x

An object of class 'slouch'

theta, phi

angles defining the viewing direction. theta gives the azimuthal direction and phi the colatitude.

expand

a expansion factor applied to the z coordinates. Often used with 0 < expand < 1 to shrink the plotting box in the z direction.

shade

the shade at a surface facet is computed as ((1+d)/2)^shade, where d is the dot product of a unit vector normal to the facet and a unit vector in the direction of a light source. Values of shade close to one yield shading similar to a point light source model and values close to zero produce no shading. Values in the range 0.5 to 0.75 provide an approximation to daylight illumination.

...

Additional parameters passed to persp(...) or plot(...)

Examples

Run this code

data(artiodactyla)
data(neocortex)

neocortex <- neocortex[match(artiodactyla$tip.label, neocortex$species), ]

m0 <- slouch.fit(phy = artiodactyla,
                 hl_values = seq(0.001, 50, length.out = 15),
                 vy_values = seq(0.001, 3, length.out = 15),
                 species = neocortex$species,
                 response = neocortex$body_mass_g_log_mean,
                 mv.response = neocortex$body_mass_g_log_varmean,
                 fixed.fact = neocortex$diet)
                 
plot(m0)

Run the code above in your browser using DataLab