Learn R Programming

barplot3d (version 1.0.1)

legoplot3d: A wrapper function to create a sequence context "legoplot"

Description

A wrapper function to create a sequence context "legoplot"

Usage

legoplot3d(contextdata, alpha = 1, scalexy = 1, gap = 0.2,
  sixcolors = "broad", theta = 50, phi = 40, gridlines = TRUE,
  labels = FALSE, zlabels = TRUE, zsub = FALSE)

Arguments

contextdata

A numeric vector of counts or frequencies of the 96 possible somatic mutations and trinucleotide contexts. These MUST be in the same order as in the example (see example and/or vignette).

alpha

The alpha channel (transparency) of the sides of 3D bars. Range 0-1.

scalexy

Scaling factor for x and y coordinates; this constant can be used to make the plot "skinnier" or "fatter".

gap

Gap between 3D bars.

sixcolors

The color scheme. "broad" for Broad Institute colors, "sanger" for Sanger Institute colors or a vector of six hexadecimal RGB colors.

theta

Polar coordinate for viewing the 3D barplot; range 0 to 360 (rotates the plot).

phi

Polar coordinate for viewing the 3D barplot; range -90 to 90 (-90 is directly below, 90 directly above).

gridlines

Draw gridlines on the plot (TRUE or FALSE).

labels

Include the default axis labels (TRUE or FALSE).

zlabels

Labels for the z axis; add numeric scale to the vertical dimension of the plot (TRUE or FALSE).

zsub

Descriptive label for the z axis.

Value

Nothing is returned (invisibly returns NULL).

Examples

Run this code
# NOT RUN {
# Read in COSMIC signature probabilities
x=system.file("extdata", "signature_probabilities.txt", package = "barplot3d")
sigdata=read.table(x,header=TRUE,stringsAsFactors = FALSE)
# Plot signature 2 with Sanger colors and some transparency so we can see all bars
legoplot3d(contextdata=sigdata$Signature_2,labels=TRUE,scalexy=0.05,sixcolors="sanger",
alpha=0.4,zsub="Probability")
# }

Run the code above in your browser using DataLab