rankPlot | R Documentation |
Rankplot for given column.
rankPlot(
data,
order_col = "log2FoldChange",
midpoint = 0,
saveplot = NULL,
label = NULL,
alpha = 0.5,
colorvector = c("green", "yellow", "red"),
width = 13.5,
height = 15,
...
)
data |
A dataframe with effective row names. |
order_col |
Specify which column would be used for plot. Default "log2FoldChange". |
midpoint |
Specify the midpoint for color show. Default 0. |
saveplot |
Save plot to given file "a.pdf", "b.png". |
label |
Label points. Accept a number to get top x points to label (both directions). Or a vector matched with rownames of dataframe to label specified points. Or a named vector to label specified points with new names. |
alpha |
Transparency value. |
colorvector |
A vector with length 2 to speicfy low and high colors.
Or a vector with length 3 to specify low, middle and high colors.
Default |
width |
Picture width in "cm". |
height |
Picture height in "cm". |
... |
Additional parameters given to |
A ggplot2 object
a <- data.frame(log2FoldChange=rnorm(1000), row.names=paste0("ImageGP",1:1000))
## Raw plot
rankPlot(a)
## Label top 10
rankPlot(a, label=10)
## Label specified points
rankPlot(a, label=c("ImageGP1","ImageGP2","ImageGP10"))
## Label specified points with new names
b <- c("A","B","C")
names(b) <- c("ImageGP1","ImageGP2","ImageGP10")
rankPlot(a, label=b)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.