position_fill

0th

Percentile

Stack overlapping objects on top of one another, and standardise to have equal height.

Stack overlapping objects on top of one another, and standardise to have equal height.

Usage
position_fill(width = NULL, height = NULL)
Arguments
width
Manually specify width (does not affect all position adjustments)
height
Manually specify height (does not affect all position adjustments)
See Also

See geom_bar and geom_area for more examples.

Other position adjustments: position_dodge; position_identity; position_jitterdodge; position_jitter; position_stack

Aliases
  • position_fill
Examples
# See ?geom_bar and ?geom_area for more examples
ggplot(mtcars, aes(x=factor(cyl), fill=factor(vs))) +
  geom_bar(position="fill")

cde <- geom_histogram(position="fill", binwidth = 500)

ggplot(diamonds, aes(x=price)) + cde
ggplot(diamonds, aes(x=price, fill=cut)) + cde
ggplot(diamonds, aes(x=price, fill=clarity)) + cde
ggplot(diamonds, aes(x=price, fill=color)) + cde
Documentation reproduced from package ggplot2, version 1.0.1, License: GPL-2

Community examples

Looks like there are no examples yet.