Plots event table columns as vertical bars.
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,
...
)
An event table.
Names or indices of the event table columns to plot together as stacked bars.
Limits for the x and y axes. If NULL
, limits are set to the range of the data and the y limits extended as needed to include 0.
The values to label on the x and y axes. If NULL
, only the min and max x and y are labeled (and 0 as needed for y). If axTicks
, the function will be used to generate R default tick marks.
Labels for the x and y tick positions.
An overall title for the plot.
Titles for the x and y axes.
If TRUE
, a lined horizontal grid is plotted at the yticks.
The maximum significant figures to use for the x and y axis labels.
Color(s) for the bars. If NULL
, bars are transparent. By default, a grey palette is used.
Color(s) for bar borders. Use border = NA to omit borders.
Line type(s) for bar borders.
Line width(s) for bar borders.
Logical value or NA
. If FALSE
, all plotting is clipped to the plot region, if TRUE
, all plotting is clipped to the figure region, and if NA
, all plotting is clipped to the device region.
Additional arguments passed to plot
.
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.