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

Regression: Can no longer set individual node colours #145

Closed
kyllingstad opened this issue Apr 13, 2021 · 2 comments · Fixed by #146
Closed

Regression: Can no longer set individual node colours #145

kyllingstad opened this issue Apr 13, 2021 · 2 comments · Fixed by #146

Comments

@kyllingstad
Copy link

I'll use the example from README.md to illustrate the issue:

using GraphRecipes
using Plots

g = [0 1 1;
     1 0 1;
     1 1 0]

graphplot(g,
          x=[0,-1/tan/3),1/tan/3)], y=[1,0,0],
          nodeshape=:circle, nodesize=1.1,
          axis_buffer=0.6,
          curves=false,
          color=:black,
          nodecolor=[colorant"#389826",colorant"#CB3C33",colorant"#9558B2"],
          linewidth=10)

This no longer produces the expected red, green and purple nodes. Instead, it plots three green nodes and prints the following warnings:

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

Tested with Julia 1.6 and Plots.jl backends GR and PyPlot.

@kyllingstad
Copy link
Author

I've investigated some more, and found that the problem occurs with Plots.jl v. 1.11, but not with v. 1.10.

@JackDevine
Copy link
Member

Thanks for the report, I will look into it.

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