Welcome to nx3d’s documentation!

nx3d provides interactive, extensible 3D plotting functionality for the networkx Python package.

The project homepage has quickstart instructions.

_images/frucht_thin.gif

Alternatives

There are several alternative 3D plotting tools for networkx graphs. You may find your solution among these.

Using matplotlib

Using plotly

Using Mayavi2

So why another one?

Because none of the alternatives are built on a 3D game engine. This design choice provides nx3d with an embarassment of flexibility.

Hello world, start here

Install with pip install nx3d. Check your installation with python -m nx3d autolabel. Use in your code like nx3d.plot(nx.tetrahedral_graph()). See the Usage and Examples pages next.

Known limitations

large graphs

Graphs with more than 500 nodes may degrade the frame-rate on older computers. Try nx3d.plot(nx.random_lobster(100,.9,.9)) to get a sense of how performance scales on your system.

render attributes

nx3d doesn’t have all the same controls that Matplotlib does (yet). While you can set size, label, color, and position - some attributes like marker kind aren’t yet available. See this milestone for progress on these features.

threading

The networkx graph controling the render state is singular, but it has no synchronization primitives. See Panda3D’s docs on threading if you need this functionality.

Code of Conduct

Contributor Covenant