View source: R/geom-annotate.R
geom_annotate | R Documentation |
A wrapper funtion to add some annotate elements on ggplot.
geom_annotate(
mapping = NULL,
data = NULL,
stat = "identity",
position = "rt",
show.legend = FALSE,
...,
annotate = NULL,
width = NULL,
height = NULL,
recycle = FALSE,
na.rm = FALSE
)
annotateGrob(annotate, ...)
## S3 method for class 'grob'
annotateGrob(
annotate,
position = "rt",
width = NULL,
height = NULL,
nudge_x = 0,
nudge_y = 0,
default.units = "npc",
...
)
## S3 method for class 'character'
annotateGrob(
annotate,
position = "rt",
hjust = 0.5,
vjust = 0.5,
width = NULL,
height = NULL,
nudge_x = 0,
nudge_y = 0,
default.units = "npc",
parse = FALSE,
...
)
## S3 method for class 'raster'
annotateGrob(
annotate,
position = "rt",
width = 0.5,
height = 0.5,
nudge_x = 0,
nudge_y = 0,
default.units = "npc",
...
)
## S3 method for class ''magick-image''
annotateGrob(
annotate,
position = "rt",
width = 0.5,
height = 0.5,
nudge_x = 0,
nudge_y = 0,
default.units = "npc",
...
)
## S3 method for class 'ggplot'
annotateGrob(
annotate,
position = "rt",
width = 0.5,
height = 0.5,
nudge_x = 0,
nudge_y = 0,
default.units = "npc",
...
)
## S3 method for class ''NULL''
annotateGrob(annotate, ...)
## S3 method for class 'numeric'
annotateGrob(annotate, digits = 2, nsmall = 2, ...)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
stat |
The statistical transformation to use on the data for this
layer, either as a |
position |
string, position of annotate:
|
show.legend |
logical. Should this layer be included in the legends?
|
... |
other parameters passing to convert-function. |
annotate |
a grob object, or other object can be converted to a grob. |
width, height |
width/height of annotate. |
recycle |
if TRUE indicating annotate will repeated to the same length as rows of data. |
na.rm |
not used. |
nudge_x, nudge_y |
a minor shift of position, should be a grid::unit object. |
default.units |
A string indicating the default units to use. |
hjust, vjust |
a numeric vector specifying horizontal/vertical justification. |
parse |
if TRUE (default) will convert text to richtext. |
digits |
integer indicating the number of decimal places (round) to be used, the default value is 2. |
nsmall |
the minimum number of digits to the right of the decimal point, the default value is 2. |
a layer object.
Hou Yun
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.