Fork me on GitHub

ggplot from ŷhat


geom_bar

Usage

geom_bar(position = 'stack', stat = 'identity')

Arguments

Name Description
position Position adjustments to points. stack
stat he statistical transformation to use on the data for this layer. identity

Aesthetics

ggplot(aes(x='factor(cyl)'), data=mtcars) + \
     geom_bar()
ggplot(aes(x='factor(cyl)'), data=mtcars) + \
    geom_bar(fill='white', color='steelblue')
ggplot(aes(x='factor(cyl)', fill='factor(cyl)'), data=mtcars) + \
    geom_bar()
ggplot(aes(x='factor(cyl)', fill='factor(vs)'), data=mtcars) + \
     geom_bar()
ggplot(aes(x='factor(cyl)', fill='factor(gear)'), data=mtcars) + \
    geom_bar()