GraphRecipes.jl
GraphRecipes.jl copied to clipboard
Nodes with not labels are not drawn
As the node sizes are scaled to fit their labels, nodes without labels aren't drawn. Maybe we can use a minimum node size to handle those cases. Example of the problem:
Code (Plots 1.25.11 and GraphRecipes 0.5.9):
using Graphs, Plots, GraphRecipes
graph = smallgraph(:karate)
begin
node_labels = fill("", nv(graph))
node_labels[1] = "Mr. Hi"
node_labels[34] = "John A"
end
graphplot(graph, names=node_labels)
As a workaround can add a space when you fill the array:
using Graphs, Plots, GraphRecipes
graph = smallgraph(:karate)
begin
node_labels = fill(" ", nv(graph)) # <------- note the space difference
node_labels[1] = "Mr. Hi"
node_labels[34] = "John A"
end
graphplot(graph, names=node_labels)
Tested with plotly
and with gr
.