title: How to draw subgraph using networkx
body: <p>I try to draw subgraph from karate_club_graph in networkx based on a list of nodes'name but failed. How could draw subgraph as I want to show?</p>
  
  <pre><code>import networkx as nx
  from matplotlib import pylab as pl
  
  G = nx.karate_club_graph()
  res = [0,1,2,3,4,5]
  new_nodes = []
  for n in G.nodes(data=True):
    if n[0] in res:
      new_nodes.append(n)
  
  k = G.subgraph(new_nodes)
  pos = nx.spring_layout(k)
  
  pl.figure()
  nx.draw(k, pos=pos)
  pl.show()
  </code></pre>