ggshadow: Create faceted shadow plots

Description Usage Arguments Author(s) See Also Examples

Description

These functions create faceted shadow plots (all observations are shown in every facet greyed out with the facet's observations shown on top).

Usage

1
2
3
4
5
6
7
8
ggshadow_histogram(data, mapping = aes(), facet_var,
  nrow = NULL, ncol = NULL, bg_fill = "grey", bg_alpha = 0.5, ...)

ggshadow_point(data, mapping = aes(), facet_var,
  nrow = NULL, ncol = NULL, bg_color = "grey", bg_alpha = 0.5, ...)

ggshadow_line(data, mapping = aes(), facet_var,
  nrow = NULL, ncol = NULL, bg_color = "grey", bg_alpha = 0.5, ...)

Arguments

data

Data frame

mapping

Aesthetic mapping as in ggplot

facet_var

Character string of name of facet variable

nrow

Number of rows for faceted plot

ncol

Number of columns for faceted plot

bg_color

Color of background points/lines

bg_fill

Color (fill) of background bars

bg_alpha

Alpha value for background points/lines/bars

...

Arguments passed to plotted geom

Author(s)

Charlie Gibbons

See Also

ggplot, geom_histogram, geom_point, geom_line facet_wrap from the ggplot package. The gghighlight package provides related functions with somewhat different functionality.

Examples

1
2
3
4
5
6
ggshadow_histogram(diamonds, aes(carat), "cut")

### Reduce opacity due to overplotting;
### 'alpha' refers to facet points, 'bg_alpha' to shadows
ggshadow_point(diamonds, aes(carat, price), "cut",
  alpha = 0.2, bg_alpha = 0.1)

Brattle/BrattleExtras documentation built on May 6, 2019, 8:47 a.m.