theme_ggparliament: A theme for ggparliament

Description Usage Arguments Author(s) Examples

Description

Calls the ggparliament theme. A reconstructed opinionated theme_void() ggplot2 theme.

Usage

1
theme_ggparliament(legend, background_colour, border)

Arguments

legend

If legend = 'TRUE', add legend to plot. Defaults to 'TRUE'.

background_colour

If background colour = 'TRUE', fill panel with a grey background. Defaults to 'FALSE'.

border

If 'TRUE' add panel border. Defaults to 'FALSE'.

Author(s)

Zoe Meers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data <- election_data[
  election_data$country == "USA" &
  election_data$house == "Representatives" &
  election_data$year == "2016",
]
usa_data <- parliament_data(
  election_data = data,
  type = "semicircle",
  party_seats = data$seats,
  parl_rows = 8
)
ggplot2::ggplot(usa_data, ggplot2::aes(x, y, colour = party_long)) +
  geom_parliament_seats() +
  geom_highlight_government(government == 1) +
  theme_ggparliament(legend = TRUE, background_colour = TRUE, border = TRUE)

ggparliament documentation built on May 2, 2019, 3:35 p.m.