From 1185c44ee1819a753352195a301a7458eb7011f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20O=27Mara?= Date: Mon, 8 Apr 2019 20:58:19 +1000 Subject: [PATCH] Separate Geom.rect and Geom.rectbin gallery examples --- docs/src/gallery/geometries.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/src/gallery/geometries.md b/docs/src/gallery/geometries.md index 073d47035..43d103418 100644 --- a/docs/src/gallery/geometries.md +++ b/docs/src/gallery/geometries.md @@ -407,16 +407,26 @@ plot(x=[0, 1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 0, 4, 5, 5, 4], ``` -## [`Geom.rect`](@ref), [`Geom.rectbin`](@ref) +## [`Geom.rect`](@ref) ```@example -using Gadfly, Colors, DataFrames, RDatasets -set_default_plot_size(21cm, 8cm) +using Gadfly, Colors, DataFrames +set_default_plot_size(14cm, 8cm) theme1 = Theme(default_color=RGBA(0, 0.75, 1.0, 0.5)) -D = DataFrame(x=[0.5,1], y=[0.5,1], x1=[0,0.5], y1=[0,0.5], x2=[1,1.5], y2=[1,1.5]) -pa = plot(D, x=:x, y=:y, Geom.rectbin, theme1) -pb = plot(D, xmin=:x1, ymin=:y1, xmax=:x2, ymax=:y2, Geom.rect, theme1) -hstack(pa, pb) +D = DataFrame(x1=[0,0.5], y1=[0,0.5], x2=[1,1.5], y2=[1,1.5]) +plot(D, xmin=:x1, ymin=:y1, xmax=:x2, ymax=:y2, Geom.rect, theme1) + +``` + +## [`Geom.rectbin`](@ref) + +```@example +using Gadfly, Colors, DataFrames +set_default_plot_size(14cm, 8cm) +theme1 = Theme(default_color=RGBA(0, 0.75, 1.0, 0.5)) +D = DataFrame(x=[0.5,1], y=[0.5,1]) +plot(D, x=:x, y=:y, Geom.rectbin, theme1) + ``` ```@example