We have a number of common visualization patterns that we'd like to do. I've been using NetworkX for this, but this seems like overkill as there is a big translation between their ids and our ids, which makes the process slightly tedious and error-prone.
- standard graph drawing given xy or xyz coordinates for each vertex.
- a standard graph drawing (xy or xyz coords) for each vertex and a subset set of nodes highlighted.
- a standard graph drawing (xy or xyz coords) for each vertex and a vector of data highlighted (e.g. a float value for each node).
G = GraphLocal()
Here xy, xyz are arrays with a row for each vertex with 1 or 2 coordinates.
G.draw(xy)
G.draw(xyz)
G.draw(xy, nodemarkersize=0)
G.draw(xy, set=S)
G.draw(xy, set=S)
G.draw(xy, values=f)
G.draw(xyz, groups=g) # this is a partition.
Parameters
G.draw(coords, ...)
coords: a n-by-2 or n-by-3 array with coordinates for each node of the graph.
Optional parameters:
alpha: [0, 1] the overall alpha scaling of the plot
nodealpha: [0, 1]
edgealpha:
setalpha:
nodecolor:
edgecolor:
setcolor:
nodesize:
linewidth:
ax=None (default) will create a new figure, or this will plot in ax if not None.
Return a dictionary with:
fig, ax, nodes, edges, setnodes, setedges, groupnodes, groupedges
these are the handles to the actual plot elements, so that you could change
values after the fact.
"""
We have a number of common visualization patterns that we'd like to do. I've been using NetworkX for this, but this seems like overkill as there is a big translation between their ids and our ids, which makes the process slightly tedious and error-prone.
G = GraphLocal()
Here xy, xyz are arrays with a row for each vertex with 1 or 2 coordinates.
Parameters