New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added basic plot recipe #303
added basic plot recipe #303
Conversation
src/plotrecipes.jl
Outdated
@recipe function f{T<:TimeArray}(ta::T) | ||
labels --> reshape(ta.colnames,1,length(ta.colnames)) | ||
seriestype --> :path | ||
ta.timestamp, ta.values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"])
.