Skip to content
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

Merged
merged 3 commits into from Feb 13, 2017

Conversation

mkborregaard
Copy link
Contributor

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"]).

@recipe function f{T<:TimeArray}(ta::T)
labels --> reshape(ta.colnames,1,length(ta.colnames))
seriestype --> :path
ta.timestamp, ta.values
Copy link
Member

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

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.8%) to 96.275% when pulling d732cc6 on mkborregaard:recipe-for-time-arrays into 7928b8f on JuliaStats:master.

@milktrader milktrader merged commit 4720863 into JuliaStats:master Feb 13, 2017
@milktrader
Copy link
Contributor

Coverage will be fine maybe increase with some tests

@mkborregaard mkborregaard deleted the recipe-for-time-arrays branch February 13, 2017 22:41
@mkborregaard
Copy link
Contributor Author

Do you need me to write a line for the docs (in which case where?) or will you leave this implicit?

@milktrader
Copy link
Contributor

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.

@dourouc05
Copy link
Contributor

@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. using Plots and plot(time series) — and a link to Plots).

@mkborregaard
Copy link
Contributor Author

Sure - where in the docs should it go?

@dourouc05
Copy link
Contributor

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.

@milktrader
Copy link
Contributor

I was planning a new section called simply Plotting

@milktrader
Copy link
Contributor

If you want to start a file called plotting.rst I can make the links. I would copy an existing .rst file for the format template.

@mkborregaard
Copy link
Contributor Author

No probs. It will be a little while cause I'm going on holiday now.

@mkborregaard mkborregaard restored the recipe-for-time-arrays branch February 20, 2017 08:56
@mkborregaard
Copy link
Contributor Author

Here you are #305
I have started it up, can you take it from here?

@mkborregaard mkborregaard deleted the recipe-for-time-arrays branch February 21, 2017 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants