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
dataarray_like

Hypnogram vector

sffloat

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

filestring | None

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

start_sfloat | 0.

Record starting time given in seconds.

gridbool | False

Plot X and Y grid.

ascolorbool | False

Plot in color

dpiint | 600

Dots per inches

colordict | {}

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