1

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

egayer
  • 41
  • 5
  • 1
    Igor Alshannikov answered this question in this thread https://github.com/JetBrains/lets-plot/issues/603 – egayer Oct 05 '22 at 10:11

0 Answers0