nxpd
nxpd copied to clipboard
Allowing user provided `filter_attrs`?
One more comment.
A user provided filter_attrs
function will allow the user to generate the pydot attributes as we iterate over the graph, without requiring these attributes be saved into the data dict of node nor edges.
This essentially splits the graph data model (G) and the view (filter_attrs). It also reduces chances of having conflicts on the data dict.
Yes, definitely needed. Also probably provide a convenience function that will populate common matplotlib attributes passed from the function call.
Yes. Let's plan this a bit more before getting into coding.
My understanding is that the matplotlib attributes are far less expressive than dot attributes for graphs.
Since nxpd doesn't really use matplotlib at all, what about we define a list of possible presentation attributes that can be applied to a graph; then define how they map into the dot language attributes. Or just inherit those attribute definitions and names directly?
Aside, it would be fine to me if we mimicked a matplotlib like interface. But using DOT conventions, when possible, could be nice. Since styling of both nodes and edges is important, I'm not that hopeful that we can just port the DOT conventions over unambiguously.