This commit is contained in:
Thomas Breloff 2015-09-10 16:00:29 -04:00
parent 1139a4f0c1
commit 338c3c177f
16 changed files with 53 additions and 1 deletions

View File

@ -188,7 +188,7 @@ When plotting multiple lines, you can give every line the same trait by using th
- [x] Plot vectors/matrices/functions
- [ ] Plot DataFrames
- [ ] Subplots
- [x] Histograms
- [ ] Histograms
- [ ] 3D plotting
- [ ] Scenes/Drawing
- [ ] Graphs

View File

@ -37,6 +37,12 @@ const examples = PlotExample[
PlotExample("Build plot in pieces",
"You can add to a plot at any time.",
[:(plot(rand(100)/3; reg=true, fillto=0)), :(scatter!(rand(100); markersize=6, color=:blue))]),
PlotExample("Heatmaps",
"",
[:(heatmap(randn(10000),randn(10000); nbins=200))]),
PlotExample("Lots of line types",
"Options: (:line, :step, :stepinverted, :sticks, :dots, :none, :heatmap, :hexbin, :hist, :bar) \nNote: some may not work with all backends",
[:(plot(rand(20,4); linetypes=[:line, :step, :sticks, :dots]))]),
]

View File

@ -59,3 +59,24 @@ scatter!(rand(100); markersize=6,color=:blue)
![](../img/gadfly_example_6.png)
### Heatmaps
```julia
heatmap(randn(10000),randn(10000); nbins=200)
```
![](../img/gadfly_example_7.png)
### Lots of line types
Options: (:line, :step, :stepinverted, :sticks, :dots, :none, :heatmap, :hexbin, :hist, :bar)
Note: some may not work with all backends
```julia
plot(rand(20,4); linetypes=[:line,:step,:sticks,:dots])
```
![](../img/gadfly_example_8.png)

View File

@ -59,3 +59,24 @@ scatter!(rand(100); markersize=6,color=:blue)
![](../img/qwt_example_6.png)
### Heatmaps
```julia
heatmap(randn(10000),randn(10000); nbins=200)
```
![](../img/qwt_example_7.png)
### Lots of line types
Options: (:line, :step, :stepinverted, :sticks, :dots, :none, :heatmap, :hexbin, :hist, :bar)
Note: some may not work with all backends
```julia
plot(rand(20,4); linetypes=[:line,:step,:sticks,:dots])
```
![](../img/qwt_example_8.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 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: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -37,6 +37,7 @@ function getGeomFromLineType(linetype::Symbol)
linetype == :step && return Gadfly.Geom.step
linetype == :hist && return Gadfly.Geom.hist
linetype == :none && return Gadfly.Geom.point # change this? are we usually pairing no line with scatterplots?
linetype == :sticks && return Gadfly.Geom.bar
error("linetype $linetype not currently supported with Gadfly")
end

View File

@ -7,6 +7,9 @@ function adjustQwtKeywords(; kw...)
d = Dict(kw)
if d[:linetype] == :hexbin
d[:linetype] = :heatmap
elseif d[:linetype] == :dots
d[:linetype] = :none
d[:marker] = :hexagon
end
d[:heatmap_n] = d[:nbins]
d