How to align plots and share x or y axes with GGBunch in Lets-Plot (Python)

86 views Asked by At

I would like to align plots and share x or y axes using Lets-Plot with Python. GGBunch allows to distribute subplots inside a figure, but it doesn't seem to have any option for sharing axes between plots. Plus, plots are not automatically aligned in GGBunch. Is there any way to align plots with Lets-Plot ? using another function ?

dataex={'x':np.linspace(0,100,51), 'y1':np.random.rand(51)*10, 'y2':np.random.rand(51)*1e7}

p1=ggplot(dataex, aes(x='x',y='y1'))+geom_point()
p2=ggplot(dataex, aes(x='x',y='y2'))+geom_bar(stat='identity')


bunch = GGBunch()
bunch.add_plot(p1, 0, 0)
bunch.add_plot(p2, 0, 400)

enter image description here

0

There are 0 answers