examples
This commit is contained in:
parent
eb6b30aab1
commit
a9062b0611
@ -49,18 +49,18 @@ const examples = PlotExample[
|
||||
PlotExample("Heatmaps",
|
||||
"",
|
||||
[:(heatmap(randn(10000),randn(10000); nbins=100))]),
|
||||
PlotExample("Suported line types",
|
||||
"All options: (:line, :orderedline, :step, :stepinverted, :sticks, :scatter, :none, :heatmap, :hexbin, :hist, :bar)",
|
||||
PlotExample("Line types",
|
||||
"",
|
||||
[:(types = intersect(supportedTypes(), [:line, :step, :stepinverted, :sticks, :scatter])),
|
||||
:(n = length(types)),
|
||||
:(x = Vector[sort(rand(20)) for i in 1:n]),
|
||||
:(y = rand(20,n)),
|
||||
:(plot(x, y; linetypes=types, labels=map(string,types)))]),
|
||||
PlotExample("Supported line styles",
|
||||
"All options: (:solid, :dash, :dot, :dashdot, :dashdotdot)",
|
||||
PlotExample("Line styles",
|
||||
"",
|
||||
[:(styles = setdiff(supportedStyles(), [:auto])), :(plot(rand(20,length(styles)); linestyle=:auto, labels=map(string,styles)))]),
|
||||
PlotExample("Supported marker types",
|
||||
"All options: (:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1, :star2, :hexagon)",
|
||||
PlotExample("Marker types",
|
||||
"",
|
||||
[:(markers = setdiff(supportedMarkers(), [:none,:auto])), :(scatter(0.5:9.5, [fill(i-0.5,10) for i=length(markers):-1:1]; marker=:auto, labels=map(string,markers), markersize=10))]),
|
||||
PlotExample("Bar",
|
||||
"x is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)",
|
||||
@ -133,7 +133,7 @@ function generate_markdown(pkgname::Symbol)
|
||||
imgname = "$(pkgname)_example_$i.png"
|
||||
|
||||
# NOTE: uncomment this to overwrite the images as well
|
||||
savepng("$IMGDIR/$pkgname/$imgname")
|
||||
# savepng("$IMGDIR/$pkgname/$imgname")
|
||||
|
||||
# write out the header, description, code block, and image link
|
||||
write(md, "### $(example.header)\n\n")
|
||||
|
||||
@ -51,7 +51,7 @@ Or make a parametric plot (i.e. plot: (fx(u), fy(u))) with plot(fx, fy, umin, um
|
||||
```julia
|
||||
plot(sin,(x->begin # /home/tom/.julia/v0.4/Plots/docs/example_generation.jl, line 33:
|
||||
sin(2x)
|
||||
end),0,2π)
|
||||
end),0,2π,legend=false)
|
||||
```
|
||||
|
||||

|
||||
@ -118,9 +118,9 @@ heatmap(randn(10000),randn(10000); nbins=100)
|
||||
|
||||

|
||||
|
||||
### Suported line types
|
||||
### Line types
|
||||
|
||||
|
||||
All options: (:line, :orderedline, :step, :stepinverted, :sticks, :scatter, :none, :heatmap, :hexbin, :hist, :bar)
|
||||
|
||||
```julia
|
||||
types = intersect(supportedTypes(),[:line,:step,:stepinverted,:sticks,:scatter])
|
||||
@ -132,9 +132,9 @@ plot(x,y; linetypes=types,labels=map(string,types))
|
||||
|
||||

|
||||
|
||||
### Supported line styles
|
||||
### Line styles
|
||||
|
||||
|
||||
All options: (:solid, :dash, :dot, :dashdot, :dashdotdot)
|
||||
|
||||
```julia
|
||||
styles = setdiff(supportedStyles(),[:auto])
|
||||
@ -143,13 +143,13 @@ plot(rand(20,length(styles)); linestyle=:auto,labels=map(string,styles))
|
||||
|
||||

|
||||
|
||||
### Supported marker types
|
||||
### Marker types
|
||||
|
||||
|
||||
All options: (:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1, :star2, :hexagon)
|
||||
|
||||
```julia
|
||||
markers = setdiff(supportedMarkers(),[:none,:auto])
|
||||
plot(0.5:9.5,[fill(i - 0.5,10) for i = length(markers):-1:1]; marker=:auto,labels=map(string,markers),markersize=10)
|
||||
scatter(0.5:9.5,[fill(i - 0.5,10) for i = length(markers):-1:1]; marker=:auto,labels=map(string,markers),markersize=10)
|
||||
```
|
||||
|
||||

|
||||
|
||||
@ -51,7 +51,7 @@ Or make a parametric plot (i.e. plot: (fx(u), fy(u))) with plot(fx, fy, umin, um
|
||||
```julia
|
||||
plot(sin,(x->begin # /home/tom/.julia/v0.4/Plots/docs/example_generation.jl, line 33:
|
||||
sin(2x)
|
||||
end),0,2π)
|
||||
end),0,2π,legend=false)
|
||||
```
|
||||
|
||||

|
||||
@ -118,9 +118,9 @@ heatmap(randn(10000),randn(10000); nbins=100)
|
||||
|
||||

|
||||
|
||||
### Suported line types
|
||||
### Line types
|
||||
|
||||
|
||||
All options: (:line, :orderedline, :step, :stepinverted, :sticks, :scatter, :none, :heatmap, :hexbin, :hist, :bar)
|
||||
|
||||
```julia
|
||||
types = intersect(supportedTypes(),[:line,:step,:stepinverted,:sticks,:scatter])
|
||||
@ -132,9 +132,9 @@ plot(x,y; linetypes=types,labels=map(string,types))
|
||||
|
||||

|
||||
|
||||
### Supported line styles
|
||||
### Line styles
|
||||
|
||||
|
||||
All options: (:solid, :dash, :dot, :dashdot, :dashdotdot)
|
||||
|
||||
```julia
|
||||
styles = setdiff(supportedStyles(),[:auto])
|
||||
@ -143,13 +143,13 @@ plot(rand(20,length(styles)); linestyle=:auto,labels=map(string,styles))
|
||||
|
||||

|
||||
|
||||
### Supported marker types
|
||||
### Marker types
|
||||
|
||||
|
||||
All options: (:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1, :star2, :hexagon)
|
||||
|
||||
```julia
|
||||
markers = setdiff(supportedMarkers(),[:none,:auto])
|
||||
plot(0.5:9.5,[fill(i - 0.5,10) for i = length(markers):-1:1]; marker=:auto,labels=map(string,markers),markersize=10)
|
||||
scatter(0.5:9.5,[fill(i - 0.5,10) for i = length(markers):-1:1]; marker=:auto,labels=map(string,markers),markersize=10)
|
||||
```
|
||||
|
||||

|
||||
|
||||
@ -118,9 +118,9 @@ heatmap(randn(10000),randn(10000); nbins=100)
|
||||
|
||||

|
||||
|
||||
### Suported line types
|
||||
### Line types
|
||||
|
||||
|
||||
All options: (:line, :orderedline, :step, :stepinverted, :sticks, :scatter, :none, :heatmap, :hexbin, :hist, :bar)
|
||||
|
||||
```julia
|
||||
types = intersect(supportedTypes(),[:line,:step,:stepinverted,:sticks,:scatter])
|
||||
@ -132,9 +132,9 @@ plot(x,y; linetypes=types,labels=map(string,types))
|
||||
|
||||

|
||||
|
||||
### Supported line styles
|
||||
### Line styles
|
||||
|
||||
|
||||
All options: (:solid, :dash, :dot, :dashdot, :dashdotdot)
|
||||
|
||||
```julia
|
||||
styles = setdiff(supportedStyles(),[:auto])
|
||||
@ -143,9 +143,9 @@ plot(rand(20,length(styles)); linestyle=:auto,labels=map(string,styles))
|
||||
|
||||

|
||||
|
||||
### Supported marker types
|
||||
### Marker types
|
||||
|
||||
|
||||
All options: (:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1, :star2, :hexagon)
|
||||
|
||||
```julia
|
||||
markers = setdiff(supportedMarkers(),[:none,:auto])
|
||||
|
||||
@ -51,7 +51,7 @@ Or make a parametric plot (i.e. plot: (fx(u), fy(u))) with plot(fx, fy, umin, um
|
||||
```julia
|
||||
plot(sin,(x->begin # /home/tom/.julia/v0.4/Plots/docs/example_generation.jl, line 33:
|
||||
sin(2x)
|
||||
end),0,2π)
|
||||
end),0,2π,legend=false)
|
||||
```
|
||||
|
||||

|
||||
@ -118,9 +118,9 @@ heatmap(randn(10000),randn(10000); nbins=100)
|
||||
|
||||

|
||||
|
||||
### Suported line types
|
||||
### Line types
|
||||
|
||||
|
||||
All options: (:line, :orderedline, :step, :stepinverted, :sticks, :scatter, :none, :heatmap, :hexbin, :hist, :bar)
|
||||
|
||||
```julia
|
||||
types = intersect(supportedTypes(),[:line,:step,:stepinverted,:sticks,:scatter])
|
||||
@ -132,9 +132,9 @@ plot(x,y; linetypes=types,labels=map(string,types))
|
||||
|
||||

|
||||
|
||||
### Supported line styles
|
||||
### Line styles
|
||||
|
||||
|
||||
All options: (:solid, :dash, :dot, :dashdot, :dashdotdot)
|
||||
|
||||
```julia
|
||||
styles = setdiff(supportedStyles(),[:auto])
|
||||
@ -143,13 +143,13 @@ plot(rand(20,length(styles)); linestyle=:auto,labels=map(string,styles))
|
||||
|
||||

|
||||
|
||||
### Supported marker types
|
||||
### Marker types
|
||||
|
||||
|
||||
All options: (:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1, :star2, :hexagon)
|
||||
|
||||
```julia
|
||||
markers = setdiff(supportedMarkers(),[:none,:auto])
|
||||
plot(0.5:9.5,[fill(i - 0.5,10) for i = length(markers):-1:1]; marker=:auto,labels=map(string,markers),markersize=10)
|
||||
scatter(0.5:9.5,[fill(i - 0.5,10) for i = length(markers):-1:1]; marker=:auto,labels=map(string,markers),markersize=10)
|
||||
```
|
||||
|
||||

|
||||
|
||||
@ -51,7 +51,7 @@ Or make a parametric plot (i.e. plot: (fx(u), fy(u))) with plot(fx, fy, umin, um
|
||||
```julia
|
||||
plot(sin,(x->begin # /home/tom/.julia/v0.4/Plots/docs/example_generation.jl, line 33:
|
||||
sin(2x)
|
||||
end),0,2π)
|
||||
end),0,2π,legend=false)
|
||||
```
|
||||
|
||||

|
||||
@ -108,9 +108,9 @@ scatter!(rand(100); markersize=6,color=:blue)
|
||||
|
||||

|
||||
|
||||
### Suported line types
|
||||
### Line types
|
||||
|
||||
|
||||
All options: (:line, :orderedline, :step, :stepinverted, :sticks, :scatter, :none, :heatmap, :hexbin, :hist, :bar)
|
||||
|
||||
```julia
|
||||
types = intersect(supportedTypes(),[:line,:step,:stepinverted,:sticks,:scatter])
|
||||
@ -122,9 +122,9 @@ plot(x,y; linetypes=types,labels=map(string,types))
|
||||
|
||||

|
||||
|
||||
### Supported line styles
|
||||
### Line styles
|
||||
|
||||
|
||||
All options: (:solid, :dash, :dot, :dashdot, :dashdotdot)
|
||||
|
||||
```julia
|
||||
styles = setdiff(supportedStyles(),[:auto])
|
||||
@ -133,9 +133,9 @@ plot(rand(20,length(styles)); linestyle=:auto,labels=map(string,styles))
|
||||
|
||||

|
||||
|
||||
### Supported marker types
|
||||
### Marker types
|
||||
|
||||
|
||||
All options: (:none, :auto, :ellipse, :rect, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1, :star2, :hexagon)
|
||||
|
||||
```julia
|
||||
markers = setdiff(supportedMarkers(),[:none,:auto])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user