Learn R Programming

shadowtext (version 0.1.4)

geom_shadowtext: geom_shadowtext

Description

a shadow version of geom_text

Usage

geom_shadowtext(
  mapping = NULL,
  data = NULL,
  stat = "identity",
  position = "identity",
  ...,
  parse = FALSE,
  nudge_x = 0,
  nudge_y = 0,
  check_overlap = FALSE,
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE
)

Value

layer

Arguments

mapping

aesthetic mapping

data

the data to be displayed

stat

statistical transformation

position

position adjustment

...

additional parameter

parse

whether parse text as expression

nudge_x

horizontal adjustment of text

nudge_y

vertical adjustment of text

check_overlap

whether check overlap

na.rm

whether remove NA values

show.legend

whether show legend

inherit.aes

whether inherit aes from ggplot

Author

guangchuang yu

Examples

Run this code
library(ggplot2)
d <- data.frame(x = rnorm(3), y=rnorm(3), label = c('hello', 'world', '!!!'))
ggplot(d, aes(x,y)) + geom_shadowtext(aes(label=label, color=label), bg.colour='firebrick')

Run the code above in your browser using DataLab