Fork me on GitHub

ggplot from ŷhat


geom_text

Usage

geom_text(position = 'identity', stat = 'identity')

Arguments

Name Description
position Position adjustments to points. identity | jitter
stat The statistical transformation to use on the data for this layer. identity

Aesthetics

ggplot(mtcars, aes(x='wt', y='mpg', label='name')) +\
    geom_text()
ggplot(mtcars, aes(x='wt', y='mpg', label='name')) +\
    geom_text(size=100)
ggplot(mtcars, aes(x='wt', y='mpg', label='name', size='mpg')) +\
    geom_text()
ggplot(mtcars, aes(x='wt', y='mpg', label='name')) +\
    geom_text(hjust=0.15, vjust=0.1) +\
    geom_point()
ggplot(mtcars, aes(x='wt', y='mpg', label='name')) +\
    geom_text(angle=45) +\
    geom_point()
ggplot(mtcars, aes(x='wt', y='mpg', label='name', color='factor(cyl)')) +\
    geom_text()