examples and readme
@ -213,10 +213,12 @@ Keyword | Default | Type | Aliases
|
|||||||
`:fillrange` | `nothing` | Series | `:fillranges`, `:fillrng`
|
`:fillrange` | `nothing` | Series | `:fillranges`, `:fillrng`
|
||||||
`:foreground_color` | `auto` | Plot | `:fg`, `:fg_color`, `:fgcolor`, `:foreground`
|
`:foreground_color` | `auto` | Plot | `:fg`, `:fg_color`, `:fgcolor`, `:foreground`
|
||||||
`:group` | `nothing` | Series | `:g`, `:groups`
|
`:group` | `nothing` | Series | `:g`, `:groups`
|
||||||
|
`:guidefont` | `Plots.Font("Helvetica",16,:hcenter,:vcenter,0.0,RGB{U8}(0.0,0.0,0.0))` | Plot |
|
||||||
`:heatmap_c` | `(0.15,0.5)` | Series | `:heatmap_cs`
|
`:heatmap_c` | `(0.15,0.5)` | Series | `:heatmap_cs`
|
||||||
`:label` | `AUTO` | Series | `:lab`, `:labels`
|
`:label` | `AUTO` | Series | `:lab`, `:labels`
|
||||||
`:layout` | `nothing` | Plot |
|
`:layout` | `nothing` | Plot |
|
||||||
`:legend` | `true` | Plot | `:leg`
|
`:legend` | `true` | Plot | `:leg`
|
||||||
|
`:legendfont` | `Plots.Font("Helvetica",10,:hcenter,:vcenter,0.0,RGB{U8}(0.0,0.0,0.0))` | Plot |
|
||||||
`:line` | `nothing` | Series | `:l`
|
`:line` | `nothing` | Series | `:l`
|
||||||
`:linestyle` | `solid` | Series | `:linestyles`, `:ls`, `:s`, `:style`
|
`:linestyle` | `solid` | Series | `:linestyles`, `:ls`, `:s`, `:style`
|
||||||
`:linetype` | `path` | Series | `:linetypes`, `:lt`, `:t`, `:type`
|
`:linetype` | `path` | Series | `:linetypes`, `:lt`, `:t`, `:type`
|
||||||
@ -234,9 +236,10 @@ Keyword | Default | Type | Aliases
|
|||||||
`:nc` | `-1` | Plot |
|
`:nc` | `-1` | Plot |
|
||||||
`:nr` | `-1` | Plot |
|
`:nr` | `-1` | Plot |
|
||||||
`:pos` | `(0,0)` | Plot |
|
`:pos` | `(0,0)` | Plot |
|
||||||
`:reg` | `false` | Series | `:regression`, `:regs`
|
|
||||||
`:show` | `false` | Plot | `:display`, `:gui`
|
`:show` | `false` | Plot | `:display`, `:gui`
|
||||||
`:size` | `(600,400)` | Plot | `:windowsize`, `:wsize`
|
`:size` | `(600,400)` | Plot | `:windowsize`, `:wsize`
|
||||||
|
`:smooth` | `false` | Series | `:reg`, `:regression`, `:smooths`
|
||||||
|
`:tickfont` | `Plots.Font("Helvetica",13,:hcenter,:vcenter,0.0,RGB{U8}(0.0,0.0,0.0))` | Plot |
|
||||||
`:title` | `` | Plot |
|
`:title` | `` | Plot |
|
||||||
`:windowtitle` | `Plots.jl` | Plot | `:wtitle`
|
`:windowtitle` | `Plots.jl` | Plot | `:wtitle`
|
||||||
`:xaxis` | `nothing` | Plot |
|
`:xaxis` | `nothing` | Plot |
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
# Examples for backend: immerse
|
# Examples for backend: immerse
|
||||||
|
|
||||||
- Supported arguments: `annotation`, `background_color`, `color`, `color_palette`, `fillrange`, `fillcolor`, `group`, `label`, `layout`, `legend`, `linestyle`, `linetype`, `linewidth`, `markershape`, `markercolor`, `markersize`, `n`, `nbins`, `nc`, `nr`, `reg`, `show`, `size`, `title`, `windowtitle`, `x`, `xlabel`, `xlims`, `xticks`, `y`, `ylabel`, `ylims`, `yticks`, `xscale`, `yscale`, `xflip`, `yflip`, `z`
|
- Supported arguments: `annotation`, `background_color`, `color`, `color_palette`, `fillrange`, `fillcolor`, `foreground_color`, `group`, `label`, `layout`, `legend`, `linestyle`, `linetype`, `linewidth`, `markershape`, `markercolor`, `markersize`, `n`, `nbins`, `nc`, `nr`, `smooth`, `show`, `size`, `title`, `windowtitle`, `x`, `xlabel`, `xlims`, `xticks`, `y`, `ylabel`, `ylims`, `yticks`, `xscale`, `yscale`, `xflip`, `yflip`, `z`, `tickfont`, `guidefont`, `legendfont`
|
||||||
- Supported values for axis: `:auto`, `:left`
|
- Supported values for axis: `:auto`, `:left`
|
||||||
- Supported values for linetype: `:none`, `:line`, `:path`, `:steppost`, `:sticks`, `:scatter`, `:heatmap`, `:hexbin`, `:hist`, `:bar`, `:hline`, `:vline`, `:ohlc`
|
- Supported values for linetype: `:none`, `:line`, `:path`, `:steppre`, `:steppost`, `:sticks`, `:scatter`, `:heatmap`, `:hexbin`, `:hist`, `:bar`, `:hline`, `:vline`, `:ohlc`
|
||||||
- Supported values for linestyle: `:auto`, `:solid`, `:dash`, `:dot`, `:dashdot`, `:dashdotdot`
|
- Supported values for linestyle: `:auto`, `:solid`, `:dash`, `:dot`, `:dashdot`, `:dashdotdot`
|
||||||
- Supported values for marker: `:none`, `:auto`, `:rect`, `:ellipse`, `:diamond`, `:utriangle`, `:dtriangle`, `:cross`, `:xcross`, `:star1`, `:star2`, `:hexagon`, `:octagon`
|
- Supported values for marker: `:none`, `:auto`, `:cross`, `:diamond`, `:dtriangle`, `:ellipse`, `:heptagon`, `:hexagon`, `:octagon`, `:pentagon`, `:rect`, `:star4`, `:star5`, `:star6`, `:star7`, `:star8`, `:utriangle`, `:xcross`, `:Plots.Shape`
|
||||||
- Is `subplot`/`subplot!` supported? Yes
|
- Is `subplot`/`subplot!` supported? Yes
|
||||||
|
|
||||||
### Initialize
|
### Initialize
|
||||||
@ -150,8 +150,11 @@ plot(cumsum(randn(20,length(styles)),1); style=:auto,label=map(string,styles),w=
|
|||||||
|
|
||||||
|
|
||||||
```julia
|
```julia
|
||||||
markers = setdiff(supportedMarkers(),[:none,:auto])'
|
markers = setdiff(supportedMarkers(),[:none,:auto,Shape])'
|
||||||
scatter(0.5:9.5,[fill(i - 0.5,10) for i = length(markers):-1:1]; marker=:auto,label=map(string,markers),ms=12)
|
n = length(markers)
|
||||||
|
x = (linspace(0,10,n + 2))[2:end - 1]
|
||||||
|
y = repmat(reverse(x)',n,1)
|
||||||
|
scatter(x,y,m=(12,:auto),lab=map(string,markers),bg=:linen)
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
@ -209,30 +212,14 @@ subplot!(fakedata(100,10))
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Open/High/Low/Close
|
|
||||||
|
|
||||||
Create an OHLC chart. Pass in a vector of OHLC objects as your `y` argument. Adjust the tick width with arg `markersize`.
|
|
||||||
|
|
||||||
```julia
|
|
||||||
n = 20
|
|
||||||
hgt = rand(n) + 1
|
|
||||||
bot = randn(n)
|
|
||||||
openpct = rand(n)
|
|
||||||
closepct = rand(n)
|
|
||||||
y = [OHLC(openpct[i] * hgt[i] + bot[i],bot[i] + hgt[i],bot[i],closepct[i] * hgt[i] + bot[i]) for i = 1:n]
|
|
||||||
ohlc(y; markersize=8)
|
|
||||||
```
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### Annotations
|
### Annotations
|
||||||
|
|
||||||
Currently only text annotations are supported. Pass in a tuple or vector-of-tuples: (x,y,text). `annotate!(ann)` is shorthand for `plot!(; annotation=ann)`
|
Currently only text annotations are supported. Pass in a tuple or vector-of-tuples: (x,y,text). `annotate!(ann)` is shorthand for `plot!(; annotation=ann)`
|
||||||
|
|
||||||
```julia
|
```julia
|
||||||
y = rand(10)
|
y = rand(10)
|
||||||
plot(y,ann=(3,y[3],"this is #3"))
|
plot(y,ann=(3,y[3],text("this is #3",:left)))
|
||||||
annotate!([(5,y[5],"this is #5"),(9,y[10],"this is #10")])
|
annotate!([(5,y[5],text("this is #5",16,:red,:center)),(10,y[10],text("this is #10",:right,20,"courier"))])
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 24 KiB |