Figure fig = gridLayer(3, 3)
.add(1, 1, 2, 2, points(x, y, sz(2)))
.add(3, 2, 2, 1, hist2d(x, y, color(2)))
.add(lines(x))
.add(hist(x, bins(20)))
<BUG>.add(hist(y, bins(20)));
if (regenerate)</BUG>
ImageUtility.saveImage(fig, 400, 400, root + "/rapaio/graphics/grid-test.png");
BufferedImage bi1 = ImageUtility.buildImage(fig, 400, 400);
BufferedImage bi2 = ImageIO.read(this.getClass().getResourceAsStream("grid-test.png"));

Figure fig = gridLayer(3, 3)
.add(1, 1, 2, 2, points(x, y, sz(2)))
.add(3, 2, 2, 1, hist2d(x, y, color(2)))
.add(lines(x))
.add(hist(x, bins(20)))
.add(hist(y, bins(20)));
if (show)
WS.draw(fig);
if (regenerate)
ImageUtility.saveImage(fig, 400, 400, root + "/rapaio/graphics/grid-test.png");
BufferedImage bi1 = ImageUtility.buildImage(fig, 400, 400);
BufferedImage bi2 = ImageIO.read(this.getClass().getResourceAsStream("grid-test.png"));
