lets_plot.ylim

lets_plot.ylim(*args)

This is a shortcut for supplying the limits parameter to the y scale. Observations outside the range will be dropped.

Returns
FeatureSpec

Scale specification.

Examples

1import numpy as np
2from lets_plot import *
3LetsPlot.setup_html()
4n = 1000
5np.random.seed(42)
6x = np.random.normal(size=n)
7y = np.random.normal(size=n)
8ggplot({'x': x, 'y': y}, aes('x', 'y')) + \
9    geom_point() + ylim(-1, 1)