title: How to use igraph to plot two vertices by using non zero-based ID?
body: <p>Hello I am new to igraph. </p>
  
  <p>I'm trying to visualize a graph by using python module igraph. 
  The graph G is output of a Karger min-cut, so it always has only 2 vertices. </p>
  
  <p>The problem with igraph so far in my case is, I can only define the vertices ID in the edges as zero-based number (0, 1, ...). Cmiiw. </p>
  
  <p>While the output of the Karger min-cut is randomly numbered vertices. 
  Say that the input of the Karger min-cut is graph with 300 vertices with IDs = 0..299, then the output graph has two vertices with random IDs numbered 0..299. </p>
  
  <p>E.g. the graph G (as input to the igraph) has edges = [(124, 207), (207, 124)]. 
  If I try to plot the G, </p>
  
  <pre><code>&gt;&gt;&gt; import igraph
  &gt;&gt;&gt; edges = [(124, 207), (207, 124)]
  &gt;&gt;&gt; g = igraph.Graph(edges=edges, directed=False)
  &gt;&gt;&gt; layout = g.layout("kk")
  &gt;&gt;&gt; igraph.plot(g, layout=layout)
  </code></pre>
  
  <p>then the resulting plot has 207 vertices, not the only 2 vertices as expected, as it should be [(0,1), (1,0)], that's zero based vertices.</p>
  
  <p>How to use igraph so that I can plot two vertices by using non zero-based ID? </p>
  
  <p>Thank you very much. </p>
  
  <p><strong>Update</strong>: I have solved my problem, as suggested by @Gabor Csardi in the comment, this way,</p>
  
  <pre><code>&gt;&gt;&gt; g = igraph.Graph()
  &gt;&gt;&gt; g.add_vertices(2)
  &gt;&gt;&gt; g.vs["name"] = ["124", "207"]
  &gt;&gt;&gt; edges = [("124", "207"), ("207", "124")]
  &gt;&gt;&gt; g.add_edges(edges)
  &gt;&gt;&gt; layout = g.layout("kk")
  &gt;&gt;&gt; igraph.plot(g, layout=layout)
  </code></pre>
  
  <p>However, if there is better solution please answer, thank you.</p>