sampling_systematic#

sampling_systematic(n)#

Return a subset where items are selected at a regular interval.

Parameters:
nint

Number of items to return.

Returns:
FeatureSpec

Systematic sample specification.

Examples

1import numpy as np
2from lets_plot import *
3LetsPlot.setup_html()
4n = 1000
5x = np.arange(n)
6np.random.seed(12)
7y = np.random.normal(0, 1, n)
8ggplot({'x': x, 'y': y}, aes(x='x', y='y')) + \
9    geom_line(sampling=sampling_systematic(50))