{"action":"created","issue":{"url":"https://api.github.com/repos/nilearn/nilearn/issues/469","labels_url":"https://api.github.com/repos/nilearn/nilearn/issues/469/labels{/name}","comments_url":"https://api.github.com/repos/nilearn/nilearn/issues/469/comments","events_url":"https://api.github.com/repos/nilearn/nilearn/issues/469/events","html_url":"https://github.com/nilearn/nilearn/issues/469","id":59355573,"number":469,"title":"API discussion: changing signature of plot_connectome","user":{"login":"GaelVaroquaux","id":208217,"avatar_url":"https://avatars.githubusercontent.com/u/208217?v=3","gravatar_id":"","url":"https://api.github.com/users/GaelVaroquaux","html_url":"https://github.com/GaelVaroquaux","followers_url":"https://api.github.com/users/GaelVaroquaux/followers","following_url":"https://api.github.com/users/GaelVaroquaux/following{/other_user}","gists_url":"https://api.github.com/users/GaelVaroquaux/gists{/gist_id}","starred_url":"https://api.github.com/users/GaelVaroquaux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GaelVaroquaux/subscriptions","organizations_url":"https://api.github.com/users/GaelVaroquaux/orgs","repos_url":"https://api.github.com/users/GaelVaroquaux/repos","events_url":"https://api.github.com/users/GaelVaroquaux/events{/privacy}","received_events_url":"https://api.github.com/users/GaelVaroquaux/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nilearn/nilearn/labels/API","name":"API","color":"fef2c0"},{"url":"https://api.github.com/repos/nilearn/nilearn/labels/Discussion","name":"Discussion","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-28T19:57:04Z","updated_at":"2015-03-01T22:13:44Z","closed_at":null,"body":"As I am writing examples using plot_connectome, I am finding that I need to concatenate x, y, z coordinates (for instance that come from a CSV file), and also that I sometimes get the transposition wrong. This makes for code that is a bit ugly (basically it introduces numpy operations in the examples, while I'd like to avoid that as much as possible.\r\n\r\nWe could decide to have as a signature plot_connectome(adjacency_matrix, x, y, z). The logic behind this would be that it is easy to split than concatenate.\r\n\r\nWhat do people think?"},"comment":{"url":"https://api.github.com/repos/nilearn/nilearn/issues/comments/76634355","html_url":"https://github.com/nilearn/nilearn/issues/469#issuecomment-76634355","issue_url":"https://api.github.com/repos/nilearn/nilearn/issues/469","id":76634355,"user":{"login":"eickenberg","id":1306635,"avatar_url":"https://avatars.githubusercontent.com/u/1306635?v=3","gravatar_id":"","url":"https://api.github.com/users/eickenberg","html_url":"https://github.com/eickenberg","followers_url":"https://api.github.com/users/eickenberg/followers","following_url":"https://api.github.com/users/eickenberg/following{/other_user}","gists_url":"https://api.github.com/users/eickenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/eickenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eickenberg/subscriptions","organizations_url":"https://api.github.com/users/eickenberg/orgs","repos_url":"https://api.github.com/users/eickenberg/repos","events_url":"https://api.github.com/users/eickenberg/events{/privacy}","received_events_url":"https://api.github.com/users/eickenberg/received_events","type":"User","site_admin":false},"created_at":"2015-03-01T22:13:44Z","updated_at":"2015-03-01T22:13:44Z","body":"The same thing is done e.g. in `mayavi.mlab.triangular_mesh(x, y, z, triangles)`. From `nibabel.freesurfer` ones gets the coordinates in a `coords.shape=(n_coords, 3)` array, and all it takes to split is `x, y, z = coords.T`.\r\n\r\nAlthough I haven't understood the design choice until now, it has never been a problem to use it that way. \r\n\r\nIn this proposition here the idea is to be able to avoid needing to hstack `recarray['x'], recarray['y'], recarray['z']` and to be able to pass them directly to the `plot_connectome` function. Seems like a very good idea."}}