This commit is contained in:
Thomas Breloff 2015-09-11 17:01:16 -04:00
parent a2b3657023
commit 5796758248
27 changed files with 41 additions and 20 deletions

View File

@ -35,8 +35,11 @@ const examples = PlotExample[
"Mix arguments that apply to all series with arguments unique to each series.", "Mix arguments that apply to all series with arguments unique to each series.",
[:(plot(Vector[rand(10), rand(20)]; marker=:ellipse, markersize=8, colors=[:red,:blue]))]), [:(plot(Vector[rand(10), rand(20)]; marker=:ellipse, markersize=8, colors=[:red,:blue]))]),
PlotExample("Build plot in pieces", PlotExample("Build plot in pieces",
"You can add to a plot at any time.", "Start with a base plot...",
[:(plot(rand(100)/3; reg=true, fillto=0)), :(scatter!(rand(100); markersize=6, color=:blue))]), [:(plot(rand(100)/3; reg=true, fillto=0))]),
PlotExample("",
"and add to it later.",
[:(scatter!(rand(100); markersize=6, color=:blue))]),
PlotExample("Heatmaps", PlotExample("Heatmaps",
"", "",
[:(heatmap(randn(10000),randn(10000); nbins=200))]), [:(heatmap(randn(10000),randn(10000); nbins=200))]),

View File

@ -50,15 +50,24 @@ plot(Vector[rand(10),rand(20)]; marker=:ellipse,markersize=8,colors=[:red,:blue]
### Build plot in pieces ### Build plot in pieces
You can add to a plot at any time. Start with a base plot...
```julia ```julia
plot(rand(100) / 3; reg=true,fillto=0) plot(rand(100) / 3; reg=true,fillto=0)
scatter!(rand(100); markersize=6,color=:blue)
``` ```
![](../img/gadfly_example_6.png) ![](../img/gadfly_example_6.png)
###
and add to it later.
```julia
scatter!(rand(100); markersize=6,color=:blue)
```
![](../img/gadfly_example_7.png)
### Heatmaps ### Heatmaps
@ -67,7 +76,7 @@ scatter!(rand(100); markersize=6,color=:blue)
heatmap(randn(10000),randn(10000); nbins=200) heatmap(randn(10000),randn(10000); nbins=200)
``` ```
![](../img/gadfly_example_7.png) ![](../img/gadfly_example_8.png)
### Lots of line types ### Lots of line types
@ -78,7 +87,7 @@ Note: some may not work with all backends
plot(rand(20,4); linetypes=[:line,:step,:sticks,:dots]) plot(rand(20,4); linetypes=[:line,:step,:sticks,:dots])
``` ```
![](../img/gadfly_example_8.png) ![](../img/gadfly_example_9.png)
### Bar ### Bar
@ -88,7 +97,7 @@ x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints
bar(randn(1000)) bar(randn(1000))
``` ```
![](../img/gadfly_example_9.png) ![](../img/gadfly_example_10.png)
### Histogram ### Histogram
@ -98,7 +107,7 @@ note: fillto isn't supported on all backends
histogram(randn(1000); nbins=50,fillto=20) histogram(randn(1000); nbins=50,fillto=20)
``` ```
![](../img/gadfly_example_10.png) ![](../img/gadfly_example_11.png)
### Subplots ### Subplots
@ -113,7 +122,7 @@ histogram(randn(1000); nbins=50,fillto=20)
subplot(randn(100,5); layout=[1,1,3],linetypes=[:line,:hist,:dots,:step,:bar],nbins=10,legend=false) subplot(randn(100,5); layout=[1,1,3],linetypes=[:line,:hist,:dots,:step,:bar],nbins=10,legend=false)
``` ```
![](../img/gadfly_example_11.png) ![](../img/gadfly_example_12.png)
### Adding to subplots ### Adding to subplots
@ -123,7 +132,7 @@ Note here the automatic grid layout, as well as the order in which new series ar
subplot(randn(100,5); n=4) subplot(randn(100,5); n=4)
``` ```
![](../img/gadfly_example_12.png) ![](../img/gadfly_example_13.png)
### ###
@ -133,5 +142,5 @@ subplot(randn(100,5); n=4)
subplot!(randn(100,3)) subplot!(randn(100,3))
``` ```
![](../img/gadfly_example_13.png) ![](../img/gadfly_example_14.png)

View File

@ -50,15 +50,24 @@ plot(Vector[rand(10),rand(20)]; marker=:ellipse,markersize=8,colors=[:red,:blue]
### Build plot in pieces ### Build plot in pieces
You can add to a plot at any time. Start with a base plot...
```julia ```julia
plot(rand(100) / 3; reg=true,fillto=0) plot(rand(100) / 3; reg=true,fillto=0)
scatter!(rand(100); markersize=6,color=:blue)
``` ```
![](../img/qwt_example_6.png) ![](../img/qwt_example_6.png)
###
and add to it later.
```julia
scatter!(rand(100); markersize=6,color=:blue)
```
![](../img/qwt_example_7.png)
### Heatmaps ### Heatmaps
@ -67,7 +76,7 @@ scatter!(rand(100); markersize=6,color=:blue)
heatmap(randn(10000),randn(10000); nbins=200) heatmap(randn(10000),randn(10000); nbins=200)
``` ```
![](../img/qwt_example_7.png) ![](../img/qwt_example_8.png)
### Lots of line types ### Lots of line types
@ -78,7 +87,7 @@ Note: some may not work with all backends
plot(rand(20,4); linetypes=[:line,:step,:sticks,:dots]) plot(rand(20,4); linetypes=[:line,:step,:sticks,:dots])
``` ```
![](../img/qwt_example_8.png) ![](../img/qwt_example_9.png)
### Bar ### Bar
@ -88,7 +97,7 @@ x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints
bar(randn(1000)) bar(randn(1000))
``` ```
![](../img/qwt_example_9.png) ![](../img/qwt_example_10.png)
### Histogram ### Histogram
@ -98,7 +107,7 @@ note: fillto isn't supported on all backends
histogram(randn(1000); nbins=50,fillto=20) histogram(randn(1000); nbins=50,fillto=20)
``` ```
![](../img/qwt_example_10.png) ![](../img/qwt_example_11.png)
### Subplots ### Subplots
@ -113,7 +122,7 @@ histogram(randn(1000); nbins=50,fillto=20)
subplot(randn(100,5); layout=[1,1,3],linetypes=[:line,:hist,:dots,:step,:bar],nbins=10,legend=false) subplot(randn(100,5); layout=[1,1,3],linetypes=[:line,:hist,:dots,:step,:bar],nbins=10,legend=false)
``` ```
![](../img/qwt_example_11.png) ![](../img/qwt_example_12.png)
### Adding to subplots ### Adding to subplots
@ -123,7 +132,7 @@ Note here the automatic grid layout, as well as the order in which new series ar
subplot(randn(100,5); n=4) subplot(randn(100,5); n=4)
``` ```
![](../img/qwt_example_12.png) ![](../img/qwt_example_13.png)
### ###
@ -133,5 +142,5 @@ subplot(randn(100,5); n=4)
subplot!(randn(100,3)) subplot!(randn(100,3))
``` ```
![](../img/qwt_example_13.png) ![](../img/qwt_example_14.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB