visbrain.io.write_fig_hyp

visbrain.io.write_fig_hyp(data, sf, file=None, start_s=0, grid=False, ascolor=False, dpi=300, colors={-1: '#8bbf56', 0: '#56bf8b', 1: '#aabcce', 2: '#405c79', 3: '#0b1c2c', 4: '#bf5656'})[source][source]

Export hypnogram to a high-res png figure.

Parameters:
data : array_like

Hypnogram vector

sf : float

The sampling frequency of displayed elements (could be the down-sampling frequency)

file : string | None

Output filename (with full path). If None, the plot is displayed.

start_s : float | 0.

Record starting time given in seconds.

grid : bool | False

Plot X and Y grid.

ascolor : bool | False

Plot in color

dpi : int | 600

Dots per inches

color : dict | {}

Color for each sleep stage. Default is : {-1: ‘#8bbf56’, 0: ‘#56bf8b’, 1: ‘#aabcce’, 2: ‘#405c79’, 3: ‘#0b1c2c’, 4: ‘#bf5656’}

Examples using visbrain.io.write_fig_hyp