plot_exposure {mSigTools} | R Documentation |
Plot exposures in multiple plots, with each plot showing exposures for a manageable number of samples.
Description
Plot exposures in multiple plots, with each plot showing exposures for a manageable number of samples.
Usage
plot_exposure(
exposure,
samples.per.line = 30,
plot.proportion = FALSE,
xlim = NULL,
ylim = NULL,
legend.x = NULL,
legend.y = NULL,
cex.legend = 0.9,
cex.yaxis = 1,
cex.xaxis = NULL,
plot.sample.names = TRUE,
yaxis.labels = NULL,
...
)
Arguments
exposure |
Exposures as a numerical |
samples.per.line |
Number of samples to show in each plot. |
plot.proportion |
Plot exposure proportions rather than counts. |
xlim , ylim |
Limits for the x and y axis. If |
legend.x , legend.y |
The x and y co-ordinates to be used to position the legend. |
cex.legend |
A numerical value giving the amount by which legend plotting text and symbols should be magnified relative to the default. |
cex.yaxis |
A numerical value giving the amount by which y axis values should be magnified relative to the default. |
cex.xaxis |
A numerical value giving the amount by which x axis values
should be magnified relative to the default. If
|
plot.sample.names |
Whether to plot sample names below the x axis.
Default is TRUE. Ignored if there are no column names on
|
yaxis.labels |
User defined y axis labels to be plotted. If
|
... |
Other arguments passed to |
Value
An invisible list. The first element is a logical value indicating whether the plot is successful. The second element is a numeric vector giving the coordinates of the bar x-axis midpoints drawn, useful for adding to the graph.
Examples
file <- system.file("extdata",
"Liver-HCC.exposure.csv",
package = "mSigTools"
)
exposure <- read_exposure(file)
old.par <- par(mar = c(8, 5, 1, 1))
plot_exposure(exposure[, 1:30],
main = "Liver-HCC exposure", cex.yaxis = 0.8,
plot.proportion = TRUE
)
par(old.par)