{"action":"closed","issue":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/3118","repository_url":"https://api.github.com/repos/mne-tools/mne-python","labels_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3118/labels{/name}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3118/comments","events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3118/events","html_url":"https://github.com/mne-tools/mne-python/issues/3118","id":147868977,"number":3118,"title":"Error in ica.plot_component","user":{"login":"teonbrooks","id":1578674,"avatar_url":"https://avatars.githubusercontent.com/u/1578674?v=3","gravatar_id":"","url":"https://api.github.com/users/teonbrooks","html_url":"https://github.com/teonbrooks","followers_url":"https://api.github.com/users/teonbrooks/followers","following_url":"https://api.github.com/users/teonbrooks/following{/other_user}","gists_url":"https://api.github.com/users/teonbrooks/gists{/gist_id}","starred_url":"https://api.github.com/users/teonbrooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teonbrooks/subscriptions","organizations_url":"https://api.github.com/users/teonbrooks/orgs","repos_url":"https://api.github.com/users/teonbrooks/repos","events_url":"https://api.github.com/users/teonbrooks/events{/privacy}","received_events_url":"https://api.github.com/users/teonbrooks/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mne-tools/mne-python/labels/BUG","name":"BUG","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mne-tools/mne-python/milestones/8","html_url":"https://github.com/mne-tools/mne-python/milestones/0.12","labels_url":"https://api.github.com/repos/mne-tools/mne-python/milestones/8/labels","id":1429321,"number":8,"title":"0.12","description":"","creator":{"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},"open_issues":9,"closed_issues":130,"state":"open","created_at":"2015-11-25T13:36:18Z","updated_at":"2016-04-25T13:36:34Z","due_on":"2016-04-29T04:00:00Z","closed_at":null},"comments":8,"created_at":"2016-04-12T20:49:55Z","updated_at":"2016-04-25T13:36:34Z","closed_at":"2016-04-25T13:36:34Z","body":"Is there a particular reason or has anyone had problems with `ica.plot_components()`. I'm getting an error with the `is_bbox`. I am guessing that the bounding box is not being constructed for my channel array. This also happens when I specify the layout for the system.\r\n\r\n```\r\nIn [51]: ica.plot_components()\r\n---------------------------------------------------------------------------\r\nAttributeError                            Traceback (most recent call last)\r\n<ipython-input-51-31baf63ee5ff> in <module>()\r\n----> 1 ica.plot_components()\r\n\r\n/Applications/packages/mne-python/mne/preprocessing/ica.py in plot_components(self, picks, ch_type, res, layout, vmin, vmax, cmap, sensors, colorbar, title, show, outlines, contours, image_interp, head_pos)\r\n   1384                                    outlines=outlines, contours=contours,\r\n   1385                                    image_interp=image_interp,\r\n-> 1386                                    head_pos=head_pos)\r\n   1387 \r\n   1388     def plot_sources(self, inst, picks=None, exclude=None, start=None,\r\n\r\n/Applications/packages/mne-python/mne/viz/topomap.py in plot_ica_components(ica, picks, ch_type, res, layout, vmin, vmax, cmap, sensors, colorbar, title, show, outlines, contours, image_interp, head_pos)\r\n    748                                       show=show, outlines=outlines,\r\n    749                                       contours=contours,\r\n--> 750                                       image_interp=image_interp)\r\n    751             figs.append(fig)\r\n    752         return figs\r\n\r\n/Applications/packages/mne-python/mne/viz/topomap.py in plot_ica_components(ica, picks, ch_type, res, layout, vmin, vmax, cmap, sensors, colorbar, title, show, outlines, contours, image_interp, head_pos)\r\n    799     tight_layout(fig=fig)\r\n    800     fig.subplots_adjust(top=0.95)\r\n--> 801     fig.canvas.draw()\r\n    802     plt_show(show)\r\n    803     return fig\r\n\r\n/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.pyc in draw(self)\r\n    146         # causes problems with code that uses the result of the\r\n    147         # draw() to update plot elements.\r\n--> 148         FigureCanvasAgg.draw(self)\r\n    149         self._priv_update()\r\n    150 \r\n\r\n/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_agg.pyc in draw(self)\r\n    467 \r\n    468         try:\r\n--> 469             self.figure.draw(self.renderer)\r\n    470         finally:\r\n    471             RendererAgg.lock.release()\r\n\r\n/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)\r\n     57     def draw_wrapper(artist, renderer, *args, **kwargs):\r\n     58         before(artist, renderer)\r\n---> 59         draw(artist, renderer, *args, **kwargs)\r\n     60         after(artist, renderer)\r\n     61 \r\n\r\n/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/figure.pyc in draw(self, renderer)\r\n   1015         if self.get_tight_layout() and self.axes:\r\n   1016             try:\r\n-> 1017                 self.tight_layout(renderer, **self._tight_parameters)\r\n   1018             except ValueError:\r\n   1019                 pass\r\n\r\n/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/figure.pyc in tight_layout(self, renderer, pad, h_pad, w_pad, rect)\r\n   1661                                          renderer,\r\n   1662                                          pad=pad, h_pad=h_pad, w_pad=w_pad,\r\n-> 1663                                          rect=rect)\r\n   1664 \r\n   1665         self.subplots_adjust(**kwargs)\r\n\r\n/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/tight_layout.pyc in get_tight_layout_figure(fig, axes_list, subplotspec_list, renderer, pad, h_pad, w_pad, rect)\r\n    350                                      subplot_list=subplot_list,\r\n    351                                      ax_bbox_list=ax_bbox_list,\r\n--> 352                                      pad=pad, h_pad=h_pad, w_pad=w_pad)\r\n    353 \r\n    354     if rect is not None:\r\n\r\n/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/tight_layout.pyc in auto_adjust_subplotpars(fig, renderer, nrows_ncols, num1num2_list, subplot_list, ax_bbox_list, pad, h_pad, w_pad, rect)\r\n    129         tight_bbox_raw = union([ax.get_tightbbox(renderer) for ax in subplots])\r\n    130         tight_bbox = TransformedBbox(tight_bbox_raw,\r\n--> 131                                      fig.transFigure.inverted())\r\n    132 \r\n    133         row1, col1 = divmod(num1, cols)\r\n\r\n/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/transforms.pyc in __init__(self, bbox, transform, **kwargs)\r\n   1055         *transform*: a 2D :class:`Transform`\r\n   1056         \"\"\"\r\n-> 1057         assert bbox.is_bbox\r\n   1058         assert isinstance(transform, Transform)\r\n   1059         assert transform.input_dims == 2\r\n\r\nIn [52]: ica.plot_components()\r\nAttributeError: 'NoneType' object has no attribute 'is_bbox'\r\n\r\nIn [52]: Traceback (most recent call last):\r\n  File \"/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py\", line 427, in idle_draw\r\n    self.draw()\r\n  File \"/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py\", line 148, in draw\r\n    FigureCanvasAgg.draw(self)\r\n  File \"/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py\", line 469, in draw\r\n    self.figure.draw(self.renderer)\r\n  File \"/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/artist.py\", line 59, in draw_wrapper\r\n    draw(artist, renderer, *args, **kwargs)\r\n  File \"/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/figure.py\", line 1017, in draw\r\n    self.tight_layout(renderer, **self._tight_parameters)\r\n  File \"/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/figure.py\", line 1663, in tight_layout\r\n    rect=rect)\r\n  File \"/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/tight_layout.py\", line 352, in get_tight_layout_figure\r\n    pad=pad, h_pad=h_pad, w_pad=w_pad)\r\n  File \"/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/tight_layout.py\", line 131, in auto_adjust_subplotpars\r\n    fig.transFigure.inverted())\r\n  File \"/Users/teon/anaconda/lib/python2.7/site-packages/matplotlib/transforms.py\", line 1057, in __init__\r\n    assert bbox.is_bbox\r\nAttributeError: 'NoneType' object has no attribute 'is_bbox'\r\n\r\nIf you suspect this is an IPython bug, please report it at:\r\n    https://github.com/ipython/ipython/issues\r\nor send an email to the mailing list at ipython-dev@scipy.org\r\n\r\nYou can print a more detailed traceback right now with \"%tb\", or use \"%debug\"\r\nto interactively debug it.\r\n\r\nExtra-detailed tracebacks for bug-reporting purposes can be enabled via:\r\n    %config Application.verbose_crash=True\r\n```"}}