plot.cce {demcon}R Documentation

Plotting Method for CCE Object

Description

Create timeline plots for Chronology of Constitutional Event datasets.

Usage

## S3 method for class 'cce'
plot(
  x,
  y,
  ...,
  cntry,
  lab_adj = 0.25,
  detailed_lab = TRUE,
  no_lab = FALSE,
  years = c(min(x$year), max(x$year)),
  plot_pal = c("#003f5c", "#ff6361", "#20639b", "#ffa600", "#58508d", "#bc5090"),
  text_col = "#3d3d3d"
)

Arguments

x

A dataset of class cce prepared by prep_cce().

y

ignored

...

Additional arguments to pass to the ggplot device.

cntry

The country to plot. This may be a character string with the country name or the numeric Correlates of War code. For a list of possible values use the command unique(x[, c("country", "cowcode")]).

lab_adj

Numeric value to buffer label positions near terminal point.

detailed_lab

Logical to print detailed or simple labels. Detailed labels contain event type and year, simple labs contain just the year.

no_lab

Logical to suppress event labels. Will make plots easier to read for countries with either long or active histories.

years

Numeric vector of length representing the starting and ending years to plot.

plot_pal

Character vector of length 6 containing color hex codes for plotting. The first element controls the line segments color, elements 2:6 control the evnttype colors.

text_col

Character string with hex code for text labeling.

Value

A ggplot2::ggplot() device.

See Also

The Comparative Constitutions Project

Examples

cce<-demcon::get_cce(del_file=TRUE, write_out = FALSE)

cce<-demcon::prep_cce(cce, evnttype_fix = TRUE)

plot(cce, cntry = "France", years = c(1850, 2010))


[Package demcon version 0.3.0 Index]