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

node coloring failed with over 197 nodes #87

Open
hldwn opened this issue Jun 16, 2019 · 2 comments
Open

node coloring failed with over 197 nodes #87

hldwn opened this issue Jun 16, 2019 · 2 comments

Comments

@hldwn
Copy link

hldwn commented Jun 16, 2019

using LightGraphs, GraphPlot;
using Colors;

n = 198
graph = barabasi_albert(n, 3, 3)

mapping = ones(n)
mapping[1:100] .= 2

nodecolor = [colorant"green", colorant"red"]
nodefillc = nodecolor[convert(Array{Int}, mapping)]
gplot(graph, nodefillc=nodefillc)

--> all nodes are black
if n<197 --> nodes are green and red

@Yuya-Furusawa
Copy link

I have a same problem.

On Jupyter Lab,

using Colors
using LightGraphs
using GraphPlot

node_colors_2 = [colorant"lightseagreen", colorant"orange"]
function plot_graph(n)
    circle = cycle_graph(n)
    actions = fill(2, n)
    nodefillc = node_colors_2[actions]
    gplot(circle, layout=circular_layout, nodefillc=nodefillc)
end

When n=99, the color of all nodes is orage, but when n=100, all nodes are black.

@hdavid16
Copy link
Contributor

Duplicate of #156

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

No branches or pull requests

3 participants