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
When I try to color a graph's nodes with a vector of colors, the index of colors in the nodecolor parameter does not seem to match the node numbers, whereas it works for the nodeshape parameter.
Here is a short example where I try to use colorant"orangered" and :rect shape for node number 9.
using LightGraphs
using Plots
using GraphRecipes
g =SimpleGraph(9)
for i in1:4; add_edge!(g, i, i+1); endfor i in5:8; add_edge!(g, i, 9); end
nodecolors = [repeat([colorant"skyblue"], 8); [colorant"orangered"]] # Last node colored in orangered
nodeshapes = [repeat([:hexagon], 8); [:rect]] # Last node with a rectangle shapegraphplot(g, names=1:9, nodecolor=nodecolors, nodeshape=nodeshapes)
Node number 1 is colored in orangered
Node number 9 has the :rect shape
Am I missing something ?
The text was updated successfully, but these errors were encountered:
Hello,
When I try to color a graph's nodes with a vector of colors, the index of colors in the
nodecolor
parameter does not seem to match the node numbers, whereas it works for thenodeshape
parameter.Here is a short example where I try to use
colorant"orangered"
and:rect
shape for node number 9.Node number 1 is colored in orangered
Node number 9 has the :rect shape
Am I missing something ?
The text was updated successfully, but these errors were encountered: