ggspectro {ggetho} | R Documentation |
Prepare a ggplot object to represent spectrogram data
Description
This function summarises spectrogram data (containing spectrograms of multiple individual),
to show period on the y
axis, time on the x
axis and power on the z
axis (e.g. as a colour).
Usage
ggspectro(
data,
mapping = aes(),
summary_FUN = mean,
summary_time_window = mins(30),
time_wrap = NULL,
time_offset = 0,
...
)
Arguments
data |
behavr::behavr table containing the data and metadata |
mapping |
default list of aesthetic mappings to use for plot |
summary_FUN |
method (function) used to summarise |
summary_time_window |
width (in seconds) of the time window to compute a summary on |
time_wrap |
time (in seconds) used to wrap the data (see details) |
time_offset |
time offset (i.e. phase, in seconds) when using |
... |
additional arguments to be passed to |
Value
An initial ggplot object that can be further edited.
References
The relevant rethomic tutorial section
See Also
-
ggperio to visualise periodograms
Examples
library(zeitgebr)
data(dams_sample)
dt <- dams_sample
spect_dt <- spectrogram(activity, dt)
pl <- ggspectro(spect_dt,time_wrap = hours(24)) +
stat_tile_etho() +
scale_y_hours(log=TRUE) +
stat_ld_annotations(ld_colours = c("grey","black"))
pl + facet_grid(period_group ~ .)
pl + facet_wrap(~ id)
[Package ggetho version 0.3.7 Index]