Skip to content

Commit

Permalink
add with/without a Stat in gallery to highlight difference
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarthur committed May 23, 2018
1 parent 91a5776 commit 0d9e54b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/src/gallery/geometries.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ plot(dataset("lattice", "singer"), x="VoicePart", y="Height", Geom.boxplot)
## Geom.contour

```@example
using Gadfly, RDatasets
using Gadfly
set_default_plot_size(14cm, 8cm)
plot(z=(x,y) -> x*exp(-(x-round(Int, x))^2-y^2),
x=linspace(-8,8,150), y=linspace(-2,2,150), Geom.contour)
xmin=[-8], xmax=[8], ymin=[-2], ymax=[2], Geom.contour)
```

```@example
Expand Down
18 changes: 10 additions & 8 deletions docs/src/gallery/scales.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

```@example
using Gadfly
set_default_plot_size(14cm, 8cm)
srand(1234)
set_default_plot_size(21cm, 8cm)
# The data are all between 0 and 1, but the color scale goes from -1 to 1.
# For example, you might do this to force a consistent color scale between plots.
plot(x=rand(12), y=rand(12), color=rand(12),
Scale.color_continuous(minvalue=-1, maxvalue=1))
xdata, ydata, cdata = rand(12), rand(12), rand(12)
p1 = plot(x=xdata, y=ydata, color=cdata);
p2 = plot(x=xdata, y=ydata, color=cdata, Scale.color_continuous(minvalue=-1, maxvalue=1));
hstack(p1,p2)
```

```@example
Expand Down Expand Up @@ -109,11 +110,12 @@ hstack(pa,pb)

```@example
using Gadfly
set_default_plot_size(14cm, 8cm)
xs = 1:10.
ys = 1:10.
set_default_plot_size(21cm, 8cm)
xs = ys = 1:10.
zs = Float64[x^2*log(y) for x in xs, y in ys]
plot(x=xs, y=ys, z=zs, Geom.contour, Scale.color_none)
p1 = plot(x=xs, y=ys, z=zs, Geom.contour);
p2 = plot(x=xs, y=ys, z=zs, Geom.contour, Scale.color_none);
hstack(p1,p2)
```


Expand Down
7 changes: 5 additions & 2 deletions docs/src/gallery/statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

```@example
using Gadfly, RDatasets
set_default_plot_size(14cm, 8cm)
plot(dataset("datasets", "iris"), x="SepalLength", y="SepalWidth",
set_default_plot_size(21cm, 8cm)
p1 = plot(dataset("datasets", "iris"), x="SepalLength", y="SepalWidth",
Geom.point)
p2 = plot(dataset("datasets", "iris"), x="SepalLength", y="SepalWidth",
Stat.binmean, Geom.point)
hstack(p1,p2)
```


Expand Down

0 comments on commit 0d9e54b

Please sign in to comment.