plotComponentMatrix: General plotting function for multiple 24-2 or 30-2 visual...

Description Usage Arguments Value Examples

Description

plotComponentMatrix plots the following 24-2 or 30-2 visual field measurement: sensitivity, TD, TD prob, PD, and PD prob:

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plotComponentMatrix(componentmatrix, ncomp = ncol(componentmatrix),
  plot.ncols = 5, plot.nrows = NULL,
  plot.annot.topleft.function = toString,
  plot.annot.bottomleft.function = function(i) NULL,
  globaltitle = sprintf("k = %i", ncol(componentmatrix)),
  globalannotright = NULL,
  zmin = -ceiling(max(abs(c(min(componentmatrix),
  max(componentmatrix))))), zmax = -zmin,
  color.pal = colorRampPalette(c("red", "white", "blue"), space =
  "Lab")(256), td.probabilities = FALSE,
  show.colorbar = !td.probabilities, titleheight = 0.2, ...)

Arguments

componentmatrix

a matrix or data frame, column represents different eyes and rows are the VF measurements of the same type (sensitivity, TD, TD prob, PD, or PD prob).

ncomp

a numeric variable defines the number of components to be plotted (default: all).

plot.ncols

a numeric variable defines the number of columns to be plotted (default: 5).

plot.nrows

a numeric variable defines the number of rows to be plotted (default: NULL (automatically calculated)).

plot.annot.topleft.function

a function(i) that is given to any subplot i to create its top left annotation.

plot.annot.bottomleft.function

a function(i) that is given to any subplot i to create its bottom left annotation (default: returns NULL).

globaltitle

a string for global title (default: k = ncomp; set to NULL to suppress global title).

globalannotright

a string annotation to the right of the global title (default: NULL).

zmin

minimum value of the color scale (default: auto defined).

zmax

maximum value of the color scale (default: auto defined).

color.pal

an object that defines color scale theme (default: colorRampPalette(c("red", "white", "blue"), space = "Lab")(256)).

td.probabilities

a logic variable indicates whether to plot TD probability symbols instead of TD colors (default: FALSE).

show.colorbar

a logic variable indicates whether to show a global colorbar (default: !td.probabilities).

titleheight

a numeric variable defines the height of the title relative to height of row one.

...

other variables to be added.

Value

heatmap for sensitivity, TD and PD input. Value plot for TD prob and PD prob input.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(vfseries)
componentmatrix = t(vfseries[1:10, grepl('^s[0-9]+', colnames(vfseries))])
globaltitle = paste("Sensitivities, k = ", ncol(componentmatrix), sep = '')
plotComponentMatrix(componentmatrix, globaltitle = globaltitle)
componentmatrix = t(vfseries[1:10, grepl('^td[0-9]+', colnames(vfseries))])
globaltitle = paste("TDs, k = ", ncol(componentmatrix), sep = '')
plotComponentMatrix(componentmatrix, globaltitle = globaltitle)
componentmatrix = t(vfseries[1:10, grepl('^pd[0-9]+', colnames(vfseries))])
globaltitle = paste("PDs, k = ", ncol(componentmatrix), sep = '')
plotComponentMatrix(componentmatrix, globaltitle = globaltitle)
componentmatrix = t(vfseries[1:10, grepl('^tdp[0-9]+', colnames(vfseries))])
globaltitle = paste("TD Probs, k = ", ncol(componentmatrix), sep = '')
plotComponentMatrix(componentmatrix, globaltitle = globaltitle, td.probabilities = TRUE)
componentmatrix = t(vfseries[1:10, grepl('^pdp[0-9]+', colnames(vfseries))])
globaltitle = paste("PD Probs, k = ", ncol(componentmatrix), sep = '')
plotComponentMatrix(componentmatrix, globaltitle = globaltitle, td.probabilities = TRUE)

vfprogression documentation built on May 24, 2019, 5:10 p.m.