Fork me on GitHub

ggplot from ŷhat


scale_y_continuous

Usage

scale_y_continuous(name = ..., breaks = ..., labels = ..., limits = ...)

Arguments

Name Description
name Label for y axis.
breaks Points at which y gridlines appear.
labels Labels for y ticks.
limits Where y axis starts/stops.

Examples

ggplot(aes(x='carat', y='price'), data=diamonds) +\
    geom_point() +\
    scale_x_continuous(limits=(0,5)) +\
scale_y_continuous(limits=(0,20000))
ggplot(aes(x='price', y='carat'), data=diamonds) +\
    geom_point() +\
    scale_x_continuous(limits=(0,20000))  +\
    scale_y_continuous(name="size of diamond (carats)", limits=(0,5))