nxpd icon indicating copy to clipboard operation
nxpd copied to clipboard

Allowing user provided `filter_attrs`?

Open rainwoodman opened this issue 10 years ago • 3 comments

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.

rainwoodman avatar Jan 11 '15 00:01 rainwoodman

Yes, definitely needed. Also probably provide a convenience function that will populate common matplotlib attributes passed from the function call.

chebee7i avatar Jan 16 '15 16:01 chebee7i

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?

rainwoodman avatar Jan 17 '15 02:01 rainwoodman

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.

chebee7i avatar Jan 25 '15 03:01 chebee7i