I have a networkx graph like this:
import networkx as nx
import matplotlib.pyplot as Plot
...
UserGraph = nx.Graph()
users = get_users()
mapping = {}
for i in range(len(users)):
user = create_user(users[i])
UserGraph.add_node(user)
mapping[user] = user.id
OutGraph = nx.relabel_nodes(UserGraph, mapping)
Plot.figure(1, figsize=(100, 100))
nx.draw_graphviz(OutGraph)
Plot.show()
This will make the output window very huge, but i need it, because there are many nodes in there. In fact I can't see the graph anymore.
How can I get scrollbars for the output window?
Or is it possible to scroll in and out somehow?
I recently found out that graphviz isn't made for drawing huge graphs, so I exported the graph as DOT-file and opened it in Gephi.
I think this could be a better solution to my problem.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.