annoPoint | R Documentation |
This function is used to add points annotations in plot.
annoPoint( object = NULL, relSideDist = 0.1, annoPos = "top", xPosition = NULL, yPosition = NULL, pCol = NULL, ptSize = 3, ptShape = NULL )
object |
Your ggplot list. Default(NULL). |
relSideDist |
The relative distance ratio to the y axis range. Default(0.1). |
annoPos |
The position for the annotation to be added. Default("top"). |
xPosition |
The x axis coordinate for the points. Default(NULL). |
yPosition |
The y axis coordinate for the points. Default(NULL). |
pCol |
The point colors. Default(NULL). |
ptSize |
The point size. Default(3). |
ptShape |
The point shape. Default(NULL). |
Return a ggplot object.
Junjun Lao
# =============================== # test function # load data data(p) # default plot annoPoint(object = p, annoPos = 'top', xPosition = c(1:10)) # specify yPosition annoPoint(object = p, annoPos = 'top', xPosition = c(1:10), yPosition = rep(c(2,4,2,6,4),each = 2)) # add right annoPoint(object = p, annoPos = 'right', yPosition = c(1:10)) # left annoPoint(object = p, annoPos = 'left', yPosition = c(1:10)) # supply xPosition to ajust annoPoint(object = p, annoPos = 'right', yPosition = c(1:10), xPosition = 0.3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.