plot_events_single {linbin} | R Documentation |
Plot Events as Bars
Description
Plots event table columns as vertical bars.
Usage
plot_events_single(
e,
cols,
xlim = NULL,
ylim = NULL,
xticks = NULL,
yticks = NULL,
xtick.labels = NULL,
ytick.labels = NULL,
main = NA,
xlab = NA,
ylab = NA,
plot.grid = FALSE,
sigfigs = c(3, 3),
col = grDevices::grey.colors(length(cols)),
border = par("fg"),
lty = par("lty"),
lwd = par("lwd"),
xpd = FALSE,
...
)
Arguments
e |
An event table. |
cols |
Names or indices of the event table columns to plot together as stacked bars. |
xlim , ylim |
Limits for the x and y axes. If |
xticks , yticks |
The values to label on the x and y axes. If |
xtick.labels , ytick.labels |
Labels for the x and y tick positions. |
main |
An overall title for the plot. |
xlab , ylab |
Titles for the x and y axes. |
plot.grid |
If |
sigfigs |
The maximum significant figures to use for the x and y axis labels. |
col |
Color(s) for the bars. If |
border |
Color(s) for bar borders. Use border = NA to omit borders. |
lty |
Line type(s) for bar borders. |
lwd |
Line width(s) for bar borders. |
xpd |
Logical value or |
... |
Additional arguments passed to |
Details
The specified event table columns are plotted together as stacked bars. Negative and positive values are stacked separately from the y = 0
baseline. Events with NA
are not shown, differentiating them from zero-valued events which are drawn as thin black lines. Point events are drawn as thin vertical lines. Overlapping events are drawn as overlapping bars, so it is best to use sample_events
with non-overlapping bins to flatten the data before plotting.