plotPathwaySpace,PathwaySpace-method | R Documentation |
plotPathwaySpace
is a wrapper function to
create dedicated ggplot graphics for PathwaySpace-class objects.
## S4 method for signature 'PathwaySpace'
plotPathwaySpace(
ps,
colors = pspace.cols(),
trim.colors = c(3, 2, 1, 2, 3),
bg.color = "grey95",
si.color = "grey85",
si.alpha = 1,
theme = c("th0", "th1", "th2", "th3"),
title = "PathwaySpace",
xlab = "Pathway coordinates 1",
ylab = "Pathway coordinates 2",
zlab = "Density",
font.size = 1,
font.color = "white",
zlim = NULL,
slices = 25,
add.grid = TRUE,
grid.color = "white",
add.summits = TRUE,
label.summits = TRUE,
summit.color = "white",
add.marks = FALSE,
marks = NULL,
mark.size = 3,
mark.color = "white",
mark.padding = 0.5,
mark.line.width = 0.5,
use.dotmark = FALSE,
add.image = FALSE
)
ps |
A PathwaySpace class object. |
colors |
A vector of colors. Each color is a specific hue used to create a customized color palette, interpolated according to the provided sequence in the vector of colors. The proportion of each color hue can be adjusted by the 'trim.colors' argument. This palette is designed to fine-tune the visibility of summits and valleys within the image space. To bypass this automatic palette generation and use the 'colors' input as-is, simply set 'trim.colors' to NULL. |
trim.colors |
An vector with 5 positive integer numbers. This argument can be used to adjust the proportion of each color hue in the palette. |
bg.color |
A single color for background. |
si.color |
A single color for silhouette.
(see |
si.alpha |
A transparency level in [0, 1], used to adjust the opacity of the silhouette. This parameter is useful for improving the perception of a background image, when one is available. |
theme |
Name of a custom PathwaySpace theme. These themes
(from 'th0' to 'th3') consist mainly of preconfigured ggplot settings,
which the user can subsequently refine using |
title |
A string for the title. |
xlab |
The title for the 'x' axis of a 2D-image space. |
ylab |
The title for the 'y' axis of a 2D-image space. |
zlab |
The title for the 'z' axis of the image signal. |
font.size |
A single numeric value passed to ggplot themes. |
font.color |
A single color passed to ggplot themes. |
zlim |
The 'z' limits of the plot (a numeric vector with two numbers). If NULL, limits are determined from the range of the input values. |
slices |
A single positive integer value used to split the image signal into equally-spaced intervals. |
add.grid |
A logical value indicating whether to add gridlines to
the image space. However, gridlines will only appear when the image
is decorated with graph silhouettes (see |
grid.color |
A color passed to |
add.summits |
A logical value indicating whether to add contour
lines to 'summits' (when summits are available;
see |
label.summits |
A logical value indicating whether to label summits. |
summit.color |
A color passed to 'summits'. |
add.marks |
A logical value indicating whether to plot vertex labels. |
marks |
A vector of vertex names to be highlighted in the image space. This argument overrides 'add.labels'. |
mark.size |
A size argument passed to |
mark.color |
A color passed to |
mark.padding |
A box padding argument passed to
|
mark.line.width |
A line width argument passed to
|
use.dotmark |
A logical value indicating whether "marks" should be represented as dots. |
add.image |
A logical value indicating whether to add a background
image, when one is available (see |
A ggplot-class object.
Mauro Castro and TCGA Network.
circularProjection
# Load a demo igraph
data('gtoy1', package = 'RGraphSpace')
# # Check graph validity
gs <- GraphSpace(gtoy1)
# Create a PathwaySpace object
ps <- buildPathwaySpace(gs, nrc = 300)
# note: adjust 'nrc' to increase image resolution
# Set '1s' as vertex signal
vertexSignal(ps) <- 1
# Create a 2D-landscape image
ps <- circularProjection(ps, k = 2, pdist = 0.4)
# Plot a 2D-landscape image
plotPathwaySpace(ps)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.