Drawing a huge graph with networkX and matplotlib
I'm essentially reasking the linked question. I think I can do a better job explaining the question. With mathplotlib.show() called on a large graph, the default is a zoomed out, clustered output. My desired endstate is to use the mathplotlib.savefig() to save the plot for use in a report. However, the savefig() output is too zoomed out, too general. Changing the image size or dpi DOES NOT fix this. Only makes the zoomed out image bigger. Is there are a way to zoom in to the graph and save that without using the UI? With the UI, I can zoom in, spread the nodes out, and center around a node in question, but I do not know how to do this automatically.
Relevant code:
nx.draw(G,pos,node_color=colorvalues, with_labels = False,node_size=values)
fig.set_size_inches(11,8.5)
if show ==0:
plt.show()
if show ==1:
plt.savefig(name+" coremem.png",bbox_inches=0,orientation='landscape',pad_inches=0.1)