Draws the individual polls as points and every trend added with
popAddTrend() (or already published by POLITICO) as a line. Trends that
come with a variance, such as kalman, are drawn with an uncertainty band,
the events in x$events as vertical lines.
Usage
# S3 method for class 'popPolls'
plot(x, ..., bands = TRUE, level = 0.95, events = TRUE)Arguments
- x
A
popPollsobject.- ...
Passed on to
graphics::plot(), e.g.xlimto limit the date range.xlimtakes dates or ISO date strings,NAkeeps the respective end of the data range. The y axis is scaled to the polls insidexlim.- bands
Whether uncertainty bands should be drawn.
- level
Coverage of the uncertainty bands.
- events
Whether events should be marked.
Examples
if (FALSE) { # \dontrun{
de = popRead('DE-parliament')
de = popAddTrend(de, name = 'kalman', type = 'kalman')
plot(de)
plot(de, xlim = c('2024-01-01', NA), level = 0.9)
} # }