geom_logo | R Documentation |
Ggplot2 Raster Logo as Geom Layer
geom_logo(
logo = NULL,
x_npc = 0.9,
y_npc = 0.925,
logo_height = 0.06,
height_units = "npc",
...
)
logo |
Any R object that can be coerced to a raster object. Ex. class of "magick-image" |
x_npc |
x positioning for logo in normalized parent coordinates 0-1 left to right |
y_npc |
y positioning for logo in normalized parent coordinates 0-1 bottom to top |
logo_height |
Desired height of the logo |
height_units |
Units to set the height (and width) for the logo. Default is NPC i.e. a fraction of the plot panel height |
... |
Extra control options passed to ggplot2::annotation_custom() |
Returns a ggplot geom layer
library(ggplot2)
ggplot(mtcars, aes(cyl, hp)) + geom_point() + geom_logo(logo_height = 0.06)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.