Description Usage Arguments Value Examples
A wrapper function to create a sequence context "legoplot"
1 2 3 |
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. |
Nothing is returned (invisibly returns NULL).
1 2 3 4 5 6 | # 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.