{"action":"created","issue":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/2996","repository_url":"https://api.github.com/repos/mne-tools/mne-python","labels_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2996/labels{/name}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2996/comments","events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2996/events","html_url":"https://github.com/mne-tools/mne-python/issues/2996","id":139326279,"number":2996,"title":"BUG: plot_joint should pick channels","user":{"login":"kingjr","id":4881164,"avatar_url":"https://avatars.githubusercontent.com/u/4881164?v=3","gravatar_id":"","url":"https://api.github.com/users/kingjr","html_url":"https://github.com/kingjr","followers_url":"https://api.github.com/users/kingjr/followers","following_url":"https://api.github.com/users/kingjr/following{/other_user}","gists_url":"https://api.github.com/users/kingjr/gists{/gist_id}","starred_url":"https://api.github.com/users/kingjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kingjr/subscriptions","organizations_url":"https://api.github.com/users/kingjr/orgs","repos_url":"https://api.github.com/users/kingjr/repos","events_url":"https://api.github.com/users/kingjr/events{/privacy}","received_events_url":"https://api.github.com/users/kingjr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-03-08T16:38:14Z","updated_at":"2016-03-10T01:12:31Z","closed_at":null,"body":"@jona-sassenhagen \r\n\r\nCurrently, plot joint takes all chans to compute the GFP and find the ERF/P peaks. IMO, it should only get the peaks from the the channels it plots:\r\n\r\n```\r\nimport numpy as np\r\nfrom mne import EvokedArray, create_info\r\nfrom mne.viz.utils import _find_peaks\r\n\r\n# setup info\r\nn_time, n_chan = 10, 3\r\nchan_names = ['ch_%02i' % chan for chan in range(n_chan)]\r\nchan_types = ['mag', 'mag', 'misc']\r\ninfo = create_info(chan_names, 1, chan_types)\r\n\r\n# setup data\r\ndata = np.zeros((n_chan, n_time))\r\ndata[0, 0] = 10  # add ERP on first two channels\r\ndata[1, 0] = -10\r\ndata[2, 5] = 1e3  # add misc response somewhere else\r\nevoked = EvokedArray(data, info, 0)\r\n\r\n_find_peaks(evoked, 1)  # return 5, the peak of the misc response\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments/194601335","html_url":"https://github.com/mne-tools/mne-python/issues/2996#issuecomment-194601335","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2996","id":194601335,"user":{"login":"Eric89GXL","id":2365790,"avatar_url":"https://avatars.githubusercontent.com/u/2365790?v=3","gravatar_id":"","url":"https://api.github.com/users/Eric89GXL","html_url":"https://github.com/Eric89GXL","followers_url":"https://api.github.com/users/Eric89GXL/followers","following_url":"https://api.github.com/users/Eric89GXL/following{/other_user}","gists_url":"https://api.github.com/users/Eric89GXL/gists{/gist_id}","starred_url":"https://api.github.com/users/Eric89GXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eric89GXL/subscriptions","organizations_url":"https://api.github.com/users/Eric89GXL/orgs","repos_url":"https://api.github.com/users/Eric89GXL/repos","events_url":"https://api.github.com/users/Eric89GXL/events{/privacy}","received_events_url":"https://api.github.com/users/Eric89GXL/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T01:12:31Z","updated_at":"2016-03-10T01:12:31Z","body":"I would expect the lines above to do as you say, but the idea is that\nplot_joint doesn't end up doing an equivalent operation under the hood\n(since it does subselect).\n\nDo you get this error with plot_joint, plot, or what? Can you produce a\nminimal example that uses the public plotting functions incorrectly? That\nwould help isolate the problem.\n"}}