Note
Go to the end to download the full example code.
Simple directed graph#
This example shows how to plot a simple graph with iplotx.

[<iplotx.network.NetworkArtist object at 0x7dd1fa0ea490>]
import networkx as nx
import matplotlib.pyplot as plt
import iplotx as ipx
g = nx.DiGraph([(0, 1), (1, 2), (2, 3), (3, 4), (4, 0)])
layout = nx.layout.circular_layout(g)
fig, ax = plt.subplots(figsize=(3, 3))
ipx.plot(g, ax=ax, layout=layout)
Total running time of the script: (0 minutes 0.028 seconds)