xgi icon indicating copy to clipboard operation
xgi copied to clipboard

Node positions for drawing could have an improved data structure

Open nwlandry opened this issue 2 years ago • 1 comments

The current data structure is inherited from NetworkX and is key:val pairs of node ID:[x, y]. In the drawing functions, it can be inefficient to draw with a for-loop and in several places, the data structure is converted. I propose that the position be stored as pos = {"ids": np.array(ids), "x": np.array(x), "y": np.array(y)}.

nwlandry avatar Feb 16 '23 18:02 nwlandry

Once #456 is merged, this might be easier to implement.

nwlandry avatar Oct 10 '23 12:10 nwlandry