plot: plot a surface

plot,SurfaceGeometry,missing-methodR Documentation

plot a surface

Description

plot a surface

Usage

## S4 method for signature 'SurfaceGeometry,missing'
plot(
  x,
  vals = NA,
  cmap = grDevices::gray(seq(0, 1, length.out = 255)),
  vert_clrs = NULL,
  irange = range(vals),
  thresh = c(0, 0),
  alpha = 1,
  specular = "black",
  bgcol = "lightgray",
  ...
)

## S4 method for signature 'NeuroSurface,missing'
plot(
  x,
  cmap = grDevices::gray(seq(0, 1, length.out = 255)),
  vert_clrs = NULL,
  irange = range(x@data, na.rm = TRUE),
  thresh = c(0, 0),
  alpha = 1,
  specular = "black",
  bgcol = "lightgray",
  ...
)

## S4 method for signature 'LabeledNeuroSurface,missing'
plot(
  x,
  cmap = x@cols,
  vert_clrs = NULL,
  irange = range(x@data, na.rm = TRUE),
  thresh = c(0, 0),
  alpha = 1,
  specular = "black",
  bgcol = "lightgray",
  ...
)

Arguments

x

the surface to plot

vals

A numeric vector of values corresponding to each surface node. These values will be mapped to colors using the provided color map (cmap).

cmap

A color map consisting of a vector of colors in hex format. Default is rainbow(256, alpha = 1). This color map is used to color the surface based on the vals vector.

vert_clrs

Optional vertex colors in hex format. If provided, these colors will override the colors generated from vals and cmap.

irange

A numeric vector of length 2 indicating the lower and upper bounds of the intensity range for the color scale. Default is the range of vals.

thresh

A numeric vector of length 2 indicating the lower and upper transparency thresholds. Nodes with values outside this range will be made transparent.

alpha

A numeric value indicating the transparency level of the surface. The default is 1 (fully opaque). Values should be between 0 (fully transparent) and 1 (fully opaque).

specular

A color in hex format or a numeric value indicating the specular reflection color used for lighting. Default is "white".

bgcol

A color or vector of colors in hex format used to shade the surface background. Default is "lightgray".

...

extra args to send to view_surface


bbuchsbaum/neurosurf documentation built on Aug. 29, 2024, 10:53 a.m.