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

Label is ignored in plot #430

Closed
ValentinKaisermayer opened this issue Sep 4, 2019 · 2 comments · Fixed by #431
Closed

Label is ignored in plot #430

ValentinKaisermayer opened this issue Sep 4, 2019 · 2 comments · Fixed by #431
Assignees

Comments

@ValentinKaisermayer
Copy link
Contributor

If a TimeArray is plotted the label argument of plot seems to be ignored.

using TimeSeries
using Dates
using Plots

dates = Date(2018, 1, 1):Day(1):Date(2018, 12, 31)
ta = TimeArray(dates, rand(length(dates)), [:rand])

p = plot(ta, label="new label")

Thanks!

@iblislin iblislin self-assigned this Sep 6, 2019
@ValentinKaisermayer
Copy link
Contributor Author

The problem seems to be here:

labels --> reshape(String.(colnames(ta)),1,length(colnames(ta)))

@iblislin
Copy link
Collaborator

iblislin commented Oct 4, 2019

oh, so we can make it as a default to allow user-defined value.

@ohmsweetohm1 Could you make a PR and test it?

I guess it will be:

labels -> get(plotattributes, :label, reshape(String.(colnames(ta)),1,length(colnames(ta))) )

ValentinKaisermayer added a commit to ValentinKaisermayer/TimeSeries.jl that referenced this issue Oct 4, 2019
iblislin pushed a commit that referenced this issue Oct 6, 2019
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 a pull request may close this issue.

2 participants