lets_plot.GGBunch

class lets_plot.GGBunch

Collection of plots created by ggplot function. Use method add_plot() to add plot to ‘bunch’. Each plot can have arbitrary location and size. Use show() to draw all plots in bunch.

Examples

 1import numpy as np
 2from lets_plot import *
 3LetsPlot.setup_html()
 4np.random.seed(42)
 5n = 100
 6x = np.arange(n)
 7y = np.random.normal(size=n)
 8w, h = 200, 150
 9p = ggplot({'x': x, 'y': y}, aes(x='x', y='y')) + ggsize(w, h)
10bunch = GGBunch()
11bunch.add_plot(p + geom_point(), 0, 0)
12bunch.add_plot(p + geom_histogram(bins=3), w, 0)
13bunch.add_plot(p + geom_line(), 0, h, 2*w, h)
14bunch.show()