import networkx as nx import matplotlib.pyplot as plt # Assuming org_structure is a list of tuples in the form (manager, managee, 'reports-to') org_structure = [('person1', 'person2', 'reports-to'), ('person2', 'person3', 'reports-to')] G = nx.DiGraph() G.add_edges_from([(x[0], x[1]) for x in org_structure]) pos = nx.spring_layout(G) nx.draw_networkx_nodes(G, pos) nx.draw_networkx_edges(G, pos) nx.draw_networkx_labels(G, pos) plt.show()