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

Plot warnings in Documentation #492

Closed
SteffenPL opened this issue Apr 15, 2021 · 3 comments · Fixed by #493
Closed

Plot warnings in Documentation #492

SteffenPL opened this issue Apr 15, 2021 · 3 comments · Fixed by #493

Comments

@SteffenPL
Copy link

In https://juliastats.org/TimeSeries.jl/stable/plotting/ the plots don't have the correct colors anymore and
it shows the following warning:

┌ Warning: Indices Base.OneTo(24) of attribute `seriescolor` does not match data indices 1:263.
└ @ Plots ~/.julia/packages/Plots/SVksJ/src/utils.jl:102
┌ Info: Data contains NaNs or missing values, and indices of `seriescolor` vector do not match data indices.
│ If you intend elements of `seriescolor` to apply to individual NaN-separated segements in the data,
│ pass each segment in a separate vector instead, and use a row vector for `seriescolor`. Legend entries
│ may be suppressed by passing an empty label.
│ For example,
└     plot([1:2,1:3], [[4,5],[3,4,5]], label=["y" ""], seriescolor=[1 2])

I suspect that something on the Plots.jl side changed, since it also poped up suddenly in my own code.

@SteffenPL
Copy link
Author

Seems related to this change:
JuliaPlots/Plots.jl#3320

iblislin added a commit that referenced this issue Apr 16, 2021
@iblislin
Copy link
Collaborator

Hi @SteffenPL, thanks for the bug report. Could you try the PR #493 out?

iblislin added a commit that referenced this issue Apr 23, 2021
@VivaldoMendes
Copy link

I am using Plots and I have the same problem as @SteffenPL. I have Plots updated and using Julia 1.6.1. I am not using any other package.

I have a function with a two segments, one of which is represented by NaNs. I need this construction because the function is supposed to have a kink. One year ago, I produced a large set of plots with this type of construction and there was no problem at all.

This year, I am getting the error above, I have made it smaller in my REPL by adding a label and a color to the the NaN segment. But the students might get confused by this trick (they are not studying computation). In the end I just keep getting the annoying message:

Warning: Indices Base.OneTo(1) of attribute `linecolor` does not match data indices 1:21.

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.

3 participants