Fork me on GitHub

ggplot from ŷhat


geom_point

Usage

geom_point(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('wt', 'mpg')) + \
    geom_point()
ggplot(mtcars, aes('wt', 'mpg', 'qsec')) + \
    geom_point()
ggplot(mtcars, aes(x='wt', y='mpg', size='qsec')) + \
    geom_point()
ggplot(mtcars, aes(x='wt', y='mpg', color='qsec')) + \
    geom_point() +\
    scale_colour_gradient(low="coral", high="steelblue")
ggplot(mtcars, aes(x='wt', y='mpg')) + \
    geom_point(color='steelblue', size=100)
ggplot(mtcars, aes(x='wt', y='mpg')) +\
    geom_point(colour="black", size = 100) +\
    geom_point(colour="pink", size = 40)
ggplot(mtcars, aes(x='wt', y='mpg')) + \
    geom_point(color='steelblue', size=100, alpha=0.4)
ggplot(diamonds, aes(x='carat', y='price', color='color')) +\
    geom_point(alpha=0.1)