title: High Resolution Image of a Graph using NetworkX and Matplotlib
body: <p>I have a python code to generate a random graph of 300 nodes and 200 edges and display it</p>
  
  <pre><code>import networkx as nx
  import matplotlib.pyplot as plt
  
  G = nx.gnm_random_graph(300,200)
  graph_pos = nx.spring_layout(G)
  nx.draw_networkx_nodes(G, graph_pos, node_size=10, node_color='blue', alpha=0.3)
  nx.draw_networkx_edges(G, graph_pos)
  nx.draw_networkx_labels(G, graph_pos, font_size=8, font_family='sans-serif')
  plt.show()
  </code></pre>
  
  <p>However, because there are too many nodes , I need to have more pixels so that I can zoom in and save it.</p>
  
  <p>If I put</p>
  
  <pre><code>plt.figure(figsize=(18,18))
  </code></pre>
  
  <p>before showing, then the nodes and edges don't appear. What is the problem and How do I fix this?</p>