rasterPlot: Raster plot / somnogram

Description Usage Arguments Value Author(s) Examples

View source: R/plotting_tools.R

Description

Raster plot / somnogram

Usage

1
2
rasterPlot(sol, dailySamples = 480, asleepCol = "grey26",
  awakeCol = "cyan")

Arguments

sol

Simulation (output of strogatz)

dailySamples

Number of samples per day (optional)

asleepCol

Color for asleep state (optional)

awakeCol

Color for awake state (optional)

Value

Plots the raster plot / somnogram

Author(s)

Pablo Rodríguez-Sánchez (https://pabrod.github.io)

Examples

1
2
3
4
5
6
7
# Simulate a solution
y0 <- c(th1 = 0.1, th2 = 0.05)
nDays <- 60.2
ts <- seq(0, nDays*24, length.out=nDays*24*20)
sol <- strogatz(ts, y0)
# Create raster plot
rasterPlot(sol)

PabRod/sleepR documentation built on Dec. 21, 2020, 3:27 p.m.