added basic plot recipe #303
Conversation
@recipe function f{T<:TimeArray}(ta::T) | ||
labels --> reshape(ta.colnames,1,length(ta.colnames)) | ||
seriestype --> :path | ||
ta.timestamp, ta.values |
ararslan
Feb 9, 2017
Member
Please use 4 space indents for consistency with the rest of the repository
Please use 4 space indents for consistency with the rest of the repository
Coverage will be fine maybe increase with some tests |
Do you need me to write a line for the docs (in which case where?) or will you leave this implicit? |
If you can think of a reasonable test it would be great. But if it doesn't do anything but move the coverage then no. |
@mkborregaard: As a user, I'd appreciate a bit of doc about this (at least, say that it exists, maybe briefly how to make a basic plot — i.e. |
Sure - where in the docs should it go? |
In getting started? Customize how TimeArray is displayed could also be interesting, but I don't feel at ease with the idea of putting plots there. |
I was planning a new section called simply Plotting |
If you want to start a file called |
No probs. It will be a little while cause I'm going on holiday now. |
Here you are #305 |
This adds basic plotting functionality to TimeArray objects, with a very light dependency (RecipesBase a single macro). It allows plotting as simply as
plot(ohlc)
.Discussed here JuliaPlots/StatsPlots.jl#37 (comment) and here #302 .
The current recipe will plot all values in the array, which may not make sense if they are not on the same scale, but you can always
plot(ohlcv["Volume"])
.