visualize: Plot the ILDS with the relevant ILDS ighlighted

View source: R/ILDS.r

visualizeR Documentation

Plot the ILDS with the relevant ILDS ighlighted

Description

Plot the ILDS with the relevant ILDS ighlighted

Usage

visualize(x, ...)

## S3 method for class 'ILDSR2'
visualize(
  x,
  ref = TRUE,
  relcol = "red",
  rescol = "black",
  lwd = 1,
  cex = 2,
  col = "red",
  pch = 19,
  contractcol = c("red", "orange"),
  expandcol = c("blue", "cyan"),
  conftol = c(75, 50),
  useconf = TRUE,
  add = FALSE,
  plot.legend = FALSE,
  ngrid = 0,
  gridcol = "grey90",
  gridlty = 3,
  links = NULL,
  linkcol = "grey50",
  lollipop = TRUE,
  lollipopcol = "black",
  magnify = 1,
  ...
)

visualise(x, ...)

## S3 method for class 'ILDSR2'
visualise(
  x,
  ref = TRUE,
  relcol = "red",
  rescol = "black",
  lwd = 1,
  cex = 2,
  col = "red",
  pch = 19,
  contractcol = c("red", "orange"),
  expandcol = c("blue", "cyan"),
  conftol = c(75, 50),
  useconf = TRUE,
  add = FALSE,
  plot.legend = FALSE,
  ngrid = 0,
  gridcol = "grey90",
  gridlty = 3,
  links = NULL,
  linkcol = "grey50",
  lollipop = TRUE,
  lollipopcol = "black",
  magnify = 1,
  ...
)

Arguments

x

output of function ILDSR2

...

additional parameters passed to deformGrid2d / deformGrid3d.

ref

logical: if TRUE, the reference shape defined in ILDSR2 will be plotted. Otherwise the target is used. If ref=FALSE, the contraction and exxpansion will also be inverted

relcol

color of relevant ILDs

rescol

color of "irrelevant" ILDs

lwd

numeric: define line width. Relevant ILDs are displayed by 3*lwd.

cex

numeric: size of plot content

col

define color of landmarks

pch

define symbols used to plot landmarks in 2D plot.

contractcol

vector of colors for shortening ILDs, associated with confidence. Must be of length(contol).

expandcol

vector of colors for expanding ILDs, associated with confidence. Must be of length(contol).

conftol

vector: set thresholds for confidence coloring

useconf

logical: if TRUE, highlighting according to supported confidence of ILD is applied.

add

logical: if TRUE, plot is added to an existin one.

plot.legend

logical: if TRUE, a legend is added to the plots with information on the coloring scheme.

ngrid

integer: if ngrid > 0, a TPS grid is shown to display the spatial deformation from reference to target shape.

gridcol

color of TPS grid

gridlty

line type for TPS grid

links

integer vector or list containing multiple integer vectors or a k x 2 integer matrix where each row defines a single link: add information on how landmarks are linked (aka wireframe)

linkcol

color of wireframe defined by links

lollipop

logical: if TRUE, landmark displacement between reference and target is displayed as lollipop graph.

lollipopcol

color for lollipop handles

magnify

numeric: symmetrically increase differences between reference and target by that factor

Examples

## 3D Example
require(Morpho)
data(boneData)
proc <- procSym(boneLM)
groups <- name2factor(boneLM,which=3)
ilds <- ILDSR2(proc$rotated,groups,plot=FALSE,bg.rounds=0,wg.rounds=99)
visualize(ilds)

## 2D Example
require(shapes)
gor.dat <- bindArr(gorf.dat,gorm.dat,along=3)
sex <- factor(c(rep("f",30),rep("m",29)))
procg <- procSym(gor.dat)
ildsg <- ILDSR2(procg$rotated,sex,plot=FALSE,bg.rounds=0,wg.rounds=99,R2tol=.9)
visualize(ildsg,cex=2,pch=19)

## use custom color and thresholds
visualize(ildsg,cex=2,pch=19,confcol=rainbow(5),contractcol=c(0.9,0.6,0.4))

Morpho documentation built on Sept. 9, 2025, 5:46 p.m.