Skip to content

Commit

Permalink
add autoplot example
Browse files Browse the repository at this point in the history
  • Loading branch information
lschneiderbauer committed Dec 27, 2024
1 parent bd74c30 commit b2722f0
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
15 changes: 15 additions & 0 deletions R/fcwtr_scalogram.R
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,21 @@ plot.fcwtr_scalogram <- function(x, n = 1000, time_unit = "s", freq_unit = "Hz",
#' @return
#' A ggplot object.
#'
#' @examplesIf requireNamespace("ggplot2", quietly = TRUE)
#' library(ggplot2)
#'
#' res <-
#' fcwt(
#' sin((1:4410) * 2 * pi * 440 / 44100),
#' sample_freq = 44100,
#' freq_begin = 50,
#' freq_end = 1000,
#' n_freqs = 10,
#' sigma = 5
#' )
#'
#' autoplot(res, time_unit = "ms")
#'
#' @export
autoplot.fcwtr_scalogram <- function(object, n = 1000,
time_unit = "s", freq_unit = "Hz", ...) {
Expand Down
17 changes: 17 additions & 0 deletions man/autoplot.fcwtr_scalogram.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b2722f0

Please sign in to comment.