You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered: