G.add_edges_from([(1, 2), (1, 3), (1, 4), (2, 5), (2, 6), (2, 7), (3, 8), (
    3, 9), (4, 10), (5, 11), (5, 12), (6, 13)])
pos = hierarchy_pos(G, 1)
nx.draw(G, pos=pos, with_labels=True)
Can one get hierarchical graphs from networkx with python 3?