l_geom_brick: Title

Description Usage Arguments Examples

View source: R/l_geom_brick.R

Description

Title

Usage

1
2
3
4
5
6
7
8
9
l_geom_brick(
  mapping = NULL,
  data = NULL,
  position = "stack",
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE,
  ...
)

Arguments

...

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
library(ggplot2)
library(dplyr)
mtcars %>%
mutate(heavy = wt > 3) %>%
mutate(index = 1:n()) %>%
arrange(heavy) %>%
ggplot() +
  aes(x = factor(cyl)) +
  geom_bar(color = "grey85") +
  aes(group = index) +
  aes(fill = heavy)


mtcars %>%
mutate(heavy = wt > 3) %>%
ggplot() +
  aes(x = factor(cyl)) +
  l_geom_brick() +
  aes(fill = heavy) +
  aes(group = heavy) +
  scale_fill_manual(values = c("tan1",
  "steelblue3"))

EvaMaeRey/ggextend documentation built on Dec. 17, 2021, 7:24 p.m.