Use sharex
, sharey
parameters in the gggrid()
function
to control sharing of axis scale limits among plots in grid:
True
- share limits between all subplotsFalse
- do not share limits between subplotsfrom lets_plot import *
import numpy as np
LetsPlot.setup_html()
np.random.seed(37)
dat1 = {'x': np.random.normal(size=1000)}
dat2 = {'x': np.random.normal(size=200)}
p1 = ggplot(dat1, aes(x='x')) + geom_histogram()
p2 = ggplot(dat2, aes(x='x')) + geom_histogram()
gggrid([p1, p2])
gggrid([p1, p2], sharey=True)
gggrid([p1, p2], sharex=True, sharey=True)