Unify node and edge label behaviour
diegozea opened this issue · 0 comments
diegozea commented
Maybe it could be great to unify the node and edge label behavior. At this moment, names
don't skip nothing
and throw an error with missing
. For example:
using Graphs, Plots, GraphRecipes
graph = smallgraph(:karate)
begin
node_labels = Union{Nothing, String}[]
for node in vertices(graph)
if node == 1
push!(node_labels, "Mr. Hi")
elseif node == 34
push!(node_labels, "John A")
else
push!(node_labels, nothing)
end
end
end
graphplot(graph, names=node_labels)