{"action":"created","issue":{"url":"https://api.github.com/repos/jacomyal/sigma.js/issues/548","labels_url":"https://api.github.com/repos/jacomyal/sigma.js/issues/548/labels{/name}","comments_url":"https://api.github.com/repos/jacomyal/sigma.js/issues/548/comments","events_url":"https://api.github.com/repos/jacomyal/sigma.js/issues/548/events","html_url":"https://github.com/jacomyal/sigma.js/issues/548","id":70516097,"number":548,"title":"Clarify relationship between nodes' x, y, and size properties, initial zoom level","user":{"login":"ryan-williams","id":465045,"avatar_url":"https://avatars.githubusercontent.com/u/465045?v=3","gravatar_id":"","url":"https://api.github.com/users/ryan-williams","html_url":"https://github.com/ryan-williams","followers_url":"https://api.github.com/users/ryan-williams/followers","following_url":"https://api.github.com/users/ryan-williams/following{/other_user}","gists_url":"https://api.github.com/users/ryan-williams/gists{/gist_id}","starred_url":"https://api.github.com/users/ryan-williams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryan-williams/subscriptions","organizations_url":"https://api.github.com/users/ryan-williams/orgs","repos_url":"https://api.github.com/users/ryan-williams/repos","events_url":"https://api.github.com/users/ryan-williams/events{/privacy}","received_events_url":"https://api.github.com/users/ryan-williams/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-23T21:20:44Z","updated_at":"2015-06-15T14:09:55Z","closed_at":null,"body":"I am new to SigmaJS and am confused by the semantics around the `x` and `y` properties given to nodes and the `size` property on edges and nodes.\r\n\r\nHere is a simple graph I just created:\r\n\r\n```\r\nvar g = {\r\n  nodes: [\r\n    { id: '1', x: 10, y: 10, size: 10 },\r\n    { id: '2', x: 20, y: 20, size: 20 }\r\n  ],\r\n  edges: [\r\n    { id: '1-2', source: '1', target: '2', size: 10 }\r\n  ]\r\n};\r\n\r\ns = new sigma({\r\n  graph: g,\r\n  container: 'sigma-container'\r\n});\r\n```\r\n\r\nWhen I render it on a page, I see:\r\n\r\n![](http://f.cl.ly/items/1I3d1S3H1C0T352S2m38/Screen%20Shot%202015-04-23%20at%205.02.08%20PM.png)\r\n\r\nSeveral things are inconsistent with what I expected:\r\n* the distance between the nodes is actually ~100x their sizes, even though the `x`- and `y`-coordinate differences are 10 and 10 (resp.) and the nodes' `size`s are 10 and 20.\r\n* the thickness of the edge is miniscule compared to the size of each node, despite having been specified as 10 compared to the nodes' 10 and 20.\r\n* the nodes are not 10 and 20 pixels tall; they look to be about 9px and 16px, resp.\r\n* changing the node `size`s to 50 and 100 results in the same rendered graph; the nodes are ~9px and ~16px across.\r\n\r\nClearly there are some assumptions being made about what the `x`, `y`, and `size` properties mean that I don't understand. Can someone explain how the sizing works and why it works that way, and can we document some of these things?\r\n\r\nIs there any way to draw a graph where the nodes' sizes in pixels match their `size` properties?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/jacomyal/sigma.js/issues/comments/112082592","html_url":"https://github.com/jacomyal/sigma.js/issues/548#issuecomment-112082592","issue_url":"https://api.github.com/repos/jacomyal/sigma.js/issues/548","id":112082592,"user":{"login":"ckald","id":204759,"avatar_url":"https://avatars.githubusercontent.com/u/204759?v=3","gravatar_id":"","url":"https://api.github.com/users/ckald","html_url":"https://github.com/ckald","followers_url":"https://api.github.com/users/ckald/followers","following_url":"https://api.github.com/users/ckald/following{/other_user}","gists_url":"https://api.github.com/users/ckald/gists{/gist_id}","starred_url":"https://api.github.com/users/ckald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckald/subscriptions","organizations_url":"https://api.github.com/users/ckald/orgs","repos_url":"https://api.github.com/users/ckald/repos","events_url":"https://api.github.com/users/ckald/events{/privacy}","received_events_url":"https://api.github.com/users/ckald/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T14:09:55Z","updated_at":"2015-06-15T14:09:55Z","body":"Hi. I tried to follow the ideas of @ryan-williams , but no luck yet. What I'm trying to do is to define the maximum node radius as the half of the minimal distance in the graph (such that they never overlap).\r\n\r\nI've set `nodesPowRatio = 1` for normal scaling and would like to pass the nodes sizes in the same units as the coordinates. But when I set `autoRescale = false`, the plot disappears. I suspect it is just too small to see. How do I define the zoom values then?\r\n\r\nWhat should I do?"}}