ohlc example
@ -84,8 +84,8 @@ const examples = PlotExample[
|
|||||||
"",
|
"",
|
||||||
[:(subplot!(randn(100,3)))]),
|
[:(subplot!(randn(100,3)))]),
|
||||||
PlotExample("Open/High/Low/Close",
|
PlotExample("Open/High/Low/Close",
|
||||||
"Pass in a vector of 4-tuples as your `y` argument. Adjust the tick width with arg `markersize`.",
|
"Create an OHLC chart. Pass in a vector of 4-tuples as your `y` argument. Adjust the tick width with arg `markersize`.",
|
||||||
[:(n=10; hgt=rand(n)+1; bot=randn(n); openpct=rand(n); closepct=rand(n);), :(y = [(openpct[i]*hgt[i]+bot[i], bot[i]+hgt[i], bot[i], closepct[i]*hgt[i]+bot[i]) for i in 1:n];), :(ohlc(y; markersize=10))]),
|
[:(n=20), :(hgt=rand(n)+1), :(bot=randn(n)), :(openpct=rand(n)), :(closepct=rand(n)), :(y = [(openpct[i]*hgt[i]+bot[i], bot[i]+hgt[i], bot[i], closepct[i]*hgt[i]+bot[i]) for i in 1:n]), :(ohlc(y; markersize=8))]),
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
@ -133,7 +133,7 @@ function generate_markdown(pkgname::Symbol)
|
|||||||
imgname = "$(pkgname)_example_$i.png"
|
imgname = "$(pkgname)_example_$i.png"
|
||||||
|
|
||||||
# NOTE: uncomment this to overwrite the images as well
|
# 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 out the header, description, code block, and image link
|
||||||
write(md, "### $(example.header)\n\n")
|
write(md, "### $(example.header)\n\n")
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
- Supported arguments: `args`, `axis`, `color`, `kwargs`, `label`, `legend`, `linestyle`, `linetype`, `marker`, `markercolor`, `markersize`, `nbins`, `reg`, `size`, `title`, `width`, `windowtitle`, `xlabel`, `ylabel`, `yrightlabel`
|
- Supported arguments: `args`, `axis`, `color`, `kwargs`, `label`, `legend`, `linestyle`, `linetype`, `marker`, `markercolor`, `markersize`, `nbins`, `reg`, `size`, `title`, `width`, `windowtitle`, `xlabel`, `ylabel`, `yrightlabel`
|
||||||
- Supported values for axis: `:auto`, `:left`
|
- Supported values for axis: `:auto`, `:left`
|
||||||
- Supported values for linetype: `:line`, `:step`, `:sticks`, `:scatter`, `:heatmap`, `:hexbin`, `:hist`, `:bar`
|
- Supported values for linetype: `:none`, `:line`, `:step`, `:sticks`, `:scatter`, `:heatmap`, `:hexbin`, `:hist`, `:bar`, `:hline`, `:vline`, `:ohlc`
|
||||||
- Supported values for linestyle: `:auto`, `:solid`
|
- Supported values for linestyle: `:auto`, `:solid`
|
||||||
- Supported values for marker: `:none`, `:auto`, `:rect`, `:ellipse`, `:diamond`, `:cross`
|
- Supported values for marker: `:none`, `:auto`, `:rect`, `:ellipse`, `:diamond`, `:cross`
|
||||||
- Is `subplot`/`subplot!` supported? Yes
|
- Is `subplot`/`subplot!` supported? Yes
|
||||||
@ -209,3 +209,19 @@ subplot!(randn(100,3))
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
### Open/High/Low/Close
|
||||||
|
|
||||||
|
Create an OHLC chart. Pass in a vector of 4-tuples 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 = [(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)
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
- Supported arguments: `args`, `axis`, `color`, `kwargs`, `label`, `legend`, `linestyle`, `linetype`, `marker`, `markercolor`, `markersize`, `nbins`, `reg`, `size`, `title`, `width`, `windowtitle`, `xlabel`, `ylabel`, `yrightlabel`
|
- Supported arguments: `args`, `axis`, `color`, `kwargs`, `label`, `legend`, `linestyle`, `linetype`, `marker`, `markercolor`, `markersize`, `nbins`, `reg`, `size`, `title`, `width`, `windowtitle`, `xlabel`, `ylabel`, `yrightlabel`
|
||||||
- Supported values for axis: `:auto`, `:left`
|
- Supported values for axis: `:auto`, `:left`
|
||||||
- Supported values for linetype: `:line`, `:step`, `:sticks`, `:scatter`, `:heatmap`, `:hexbin`, `:hist`, `:bar`
|
- Supported values for linetype: `:none`, `:line`, `:step`, `:sticks`, `:scatter`, `:heatmap`, `:hexbin`, `:hist`, `:bar`, `:hline`, `:vline`, `:ohlc`
|
||||||
- Supported values for linestyle: `:auto`, `:solid`
|
- Supported values for linestyle: `:auto`, `:solid`
|
||||||
- Supported values for marker: `:none`, `:auto`, `:rect`, `:ellipse`, `:diamond`, `:cross`
|
- Supported values for marker: `:none`, `:auto`, `:rect`, `:ellipse`, `:diamond`, `:cross`
|
||||||
- Is `subplot`/`subplot!` supported? Yes
|
- Is `subplot`/`subplot!` supported? Yes
|
||||||
@ -209,3 +209,19 @@ subplot!(randn(100,3))
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
### Open/High/Low/Close
|
||||||
|
|
||||||
|
Create an OHLC chart. Pass in a vector of 4-tuples 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 = [(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)
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 82 KiB |
BIN
img/gadfly/gadfly_example_19.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 75 KiB |
BIN
img/immerse/immerse_example_19.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 40 KiB |