plot.cce | R Documentation |
Create timeline plots for Chronology of Constitutional Event datasets.
## 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"
)
x |
A dataset of class |
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 |
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 |
text_col |
Character string with hex code for text labeling. |
A ggplot2::ggplot()
device.
The Comparative Constitutions Project
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.