{"action":"created","issue":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/2663","repository_url":"https://api.github.com/repos/mne-tools/mne-python","labels_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2663/labels{/name}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2663/comments","events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2663/events","html_url":"https://github.com/mne-tools/mne-python/issues/2663","id":119879221,"number":2663,"title":"Plotting scatterplots on a 3D surface","user":{"login":"choldgraf","id":1839645,"avatar_url":"https://avatars.githubusercontent.com/u/1839645?v=3","gravatar_id":"","url":"https://api.github.com/users/choldgraf","html_url":"https://github.com/choldgraf","followers_url":"https://api.github.com/users/choldgraf/followers","following_url":"https://api.github.com/users/choldgraf/following{/other_user}","gists_url":"https://api.github.com/users/choldgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/choldgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choldgraf/subscriptions","organizations_url":"https://api.github.com/users/choldgraf/orgs","repos_url":"https://api.github.com/users/choldgraf/repos","events_url":"https://api.github.com/users/choldgraf/events{/privacy}","received_events_url":"https://api.github.com/users/choldgraf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-12-02T06:48:44Z","updated_at":"2016-05-03T16:43:25Z","closed_at":null,"body":"I've been playing around with Freesurfer and the [gselu](https://github.com/aestrivex/gselu) for doing electrode localization in python with ecog grids. It seems to work relatively well, which is really cool.\r\n\r\nHowever, once I've got a FS surface model of a brain, as well as electrode positions, the next step is to use them to make brain plots. The two most common ways the ecog world does this is to\r\n\r\nA. Make a scatterplot on top of the brain (where size / color represent your effect and location is the electrode position)\r\nB. Create some sort of heatmap on the cortical surface model using the electrode positions\r\n\r\nIt seems relatively straightforward to figure out B, and if an `ecog` type is ever added to mne-python I think it'd be a great viz addition. However, I'm not so sure how to do \"A\" effectively. Right now, I've tried using pysurfer to read my surface model. I've then tried two methods for plotting, which both fail for different reasons:\r\n\r\n1. Using Mayavi to plot a trisurface. This creates the brain beautifully, but the only way to create a scatterplot is to create these \"spheres\" that are rendered in 3D and look really ugly.\r\n2. Using matplotlib `plot_trisurf` to do the same thing. In this case, it creates nice \"flat\" scatterplots in the 3D axis. However, the call to `plot_trisurf` takes a really long time, and is unusably slow when it comes to rotating etc.\r\n\r\nSo I wonder, is there some way to combine the 3D capability of mayavi with the \"data plotting\" capability of matplotlib? I know that packages like this exist for matlab (e.g., [here](https://github.com/edden-gerber/ecog_fmri_visualization_matlab)). These use matlab's version of plot_trisurf, which I guess is more usable. Any thoughts on how to make this work?\r\n"},"comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments/216590213","html_url":"https://github.com/mne-tools/mne-python/issues/2663#issuecomment-216590213","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2663","id":216590213,"user":{"login":"choldgraf","id":1839645,"avatar_url":"https://avatars.githubusercontent.com/u/1839645?v=3","gravatar_id":"","url":"https://api.github.com/users/choldgraf","html_url":"https://github.com/choldgraf","followers_url":"https://api.github.com/users/choldgraf/followers","following_url":"https://api.github.com/users/choldgraf/following{/other_user}","gists_url":"https://api.github.com/users/choldgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/choldgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choldgraf/subscriptions","organizations_url":"https://api.github.com/users/choldgraf/orgs","repos_url":"https://api.github.com/users/choldgraf/repos","events_url":"https://api.github.com/users/choldgraf/events{/privacy}","received_events_url":"https://api.github.com/users/choldgraf/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T16:43:25Z","updated_at":"2016-05-03T16:43:25Z","body":"Ah that's a bummer - I thought it was going to be my savior in interactive 3-D plotting in python :-P"}}