examples
@ -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))]),
|
||||||
|
|||||||
@ -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)
|
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
and add to it later.
|
||||||
|
|
||||||
|
```julia
|
||||||
|
scatter!(rand(100); markersize=6,color=:blue)
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### 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)
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 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])
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 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))
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 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)
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 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)
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 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)
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
@ -133,5 +142,5 @@ subplot(randn(100,5); n=4)
|
|||||||
subplot!(randn(100,3))
|
subplot!(randn(100,3))
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@ -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)
|
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
and add to it later.
|
||||||
|
|
||||||
|
```julia
|
||||||
|
scatter!(rand(100); markersize=6,color=:blue)
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### 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)
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 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])
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 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))
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 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)
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 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)
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 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)
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
@ -133,5 +142,5 @@ subplot(randn(100,5); n=4)
|
|||||||
subplot!(randn(100,3))
|
subplot!(randn(100,3))
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 113 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 8.8 KiB |