title: How to add nodes at specified positions in Cytoscape.js?
body: <p>I want to add nodes at specified positions. I started off by trying to add two nodes at the same position (x=0, y=0) like so:</p>
  
  <pre><code>$(document).ready(function() {
  
  var cy = cytoscape({
    container: document.getElementById('cy'),
  });
  
  cy.add([
    { group: "nodes", data: { id: "n0" }, position: { x: 0, y: 0 } },
    { group: "nodes", data: { id: "n1" }, position: { x: 0, y: 0 } },
  ]);
  
  });
  </code></pre>
  
  <p>And I expected it to show me two nodes at the same position, one over the other. But the result was quite unexpected. Here is what I got:</p>
  
  <p><img src="https://i.stack.imgur.com/dEXLO.png" alt="enter image description here"></p>
  
  <p>In fact, the position of the nodes remains the same no matter what values of x and y I specify. I also tried <code>renderedPosition</code> instead of <code>position</code> but to no avail.</p>
  
  <p>I am searching the Cytoscape documentation for how to achieve what I want but I haven't been able to come up with a solution yet.</p>