Closed slwu89 closed 1 year ago
Does this PR follow the development guidelines? Following is a partial checklist:
Tests
test/runtests.jl
)Documentation
Other
Thanks Sean! I'm little leery of changing the display of standard Julia types, as it might seem arbitrary or unexpected to some users, but I can see the appeal when the attribute types come from product operations. So I'm inclined to go ahead with this, but for consistency, whatever transformation is applied to the node labels should also be applied to the edge labels, since edge attributes can just as easily be involved in products.
Thanks for pointing out that missing element @epatters! It's now applied to the edge labels as well with a test.
This is a very small PR that just lets
to_graphviz
work withnode_labels
using labels that are Tuples. The reason this is useful is that some operations can change the types of labels on the resulting object. For example, taking the product of aLabeledGraph{Symbol}
andLabeledGraph{String}
results in a new label of typeTuple{Symbol, String}
. This just makes the internal functions in the GraphvizGraphs module break those tuples down into a string for plotting, it's mostly useful for pedagogy.