{"action":"created","comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/33111891","id":33111891,"diff_hunk":"@@ -965,6 +967,96 @@ def add_bem_to_section(self, subject, caption='BEM', section='bem',\n         self._sectionlabels.append(sectionvar)\n         self.html.extend(html)\n \n+    def add_slider_to_section(self, figs, captions=None, section='custom',\n+                              scale=None, image_format='png'):\n+        \"\"\"Renders a slider of figs to the report.\n+\n+        figs : list of figures.\n+            Each figure in the list can be an instance of\n+            matplotlib.pyplot.Figure, mayavi.core.scene.Scene,\n+            or np.ndarray (images read in using scipy.imread).\n+        captions : list of str | float | None\n+            A list of captions to the figures. If float, a str will be\n+            constructed as `Data: %f ms`. If None, it will default to\n+            `Data slice %d`.\n+        section : str\n+            Name of the section. If section already exists, the figures\n+            will be appended to the end of the section\n+        scale : float | None | callable\n+            Scale the images maintaining the aspect ratio.\n+            If None, no scaling is applied. If float, scale will determine\n+            the relative scaling (might not work for scale <= 1 depending on\n+            font sizes). If function, should take a figure object as input\n+            parameter. Defaults to None.\n+        image_format : {'png', 'svg'}\n+            The image format to be used for the report. Defaults to 'png'.","path":"mne/report.py","position":48,"original_position":48,"commit_id":"ec0a24f24fd59c567fe6278fe394f9c207641ffc","original_commit_id":"ec0a24f24fd59c567fe6278fe394f9c207641ffc","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},"body":"the svg output was behaves weirdly on chrome + ubuntu: there's an extra image frame.\r\n\r\nOn firefox + Ubuntu, it works fine but there's an extra `\"> `","created_at":"2015-06-24T02:03:16Z","updated_at":"2015-06-24T02:03:16Z","html_url":"https://github.com/mne-tools/mne-python/pull/2234#discussion_r33111891","pull_request_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2234","_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/33111891"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/2234#discussion_r33111891"},"pull_request":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2234"}}},"pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2234","id":38395927,"html_url":"https://github.com/mne-tools/mne-python/pull/2234","diff_url":"https://github.com/mne-tools/mne-python/pull/2234.diff","patch_url":"https://github.com/mne-tools/mne-python/pull/2234.patch","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2234","number":2234,"state":"open","locked":false,"title":"General Image Slider","user":{"login":"teonlamont","id":1578674,"avatar_url":"https://avatars.githubusercontent.com/u/1578674?v=3","gravatar_id":"","url":"https://api.github.com/users/teonlamont","html_url":"https://github.com/teonlamont","followers_url":"https://api.github.com/users/teonlamont/followers","following_url":"https://api.github.com/users/teonlamont/following{/other_user}","gists_url":"https://api.github.com/users/teonlamont/gists{/gist_id}","starred_url":"https://api.github.com/users/teonlamont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teonlamont/subscriptions","organizations_url":"https://api.github.com/users/teonlamont/orgs","repos_url":"https://api.github.com/users/teonlamont/repos","events_url":"https://api.github.com/users/teonlamont/events{/privacy}","received_events_url":"https://api.github.com/users/teonlamont/received_events","type":"User","site_admin":false},"body":"Add the ability to create a general html slider with a list of figs. This can be expanded for a list of images as well.\r\nThis is currently functional. Feel free to take over the pr if it requires non-trivial reworking since I'm a bit occupied with things.","created_at":"2015-06-24T00:02:56Z","updated_at":"2015-06-24T02:03:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f25e991960bc833b0eaabca36a9ec52dd912723e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2234/commits","review_comments_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2234/comments","review_comment_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2234/comments","statuses_url":"https://api.github.com/repos/mne-tools/mne-python/statuses/ec0a24f24fd59c567fe6278fe394f9c207641ffc","head":{"label":"teonlamont:slider","ref":"slider","sha":"ec0a24f24fd59c567fe6278fe394f9c207641ffc","user":{"login":"teonlamont","id":1578674,"avatar_url":"https://avatars.githubusercontent.com/u/1578674?v=3","gravatar_id":"","url":"https://api.github.com/users/teonlamont","html_url":"https://github.com/teonlamont","followers_url":"https://api.github.com/users/teonlamont/followers","following_url":"https://api.github.com/users/teonlamont/following{/other_user}","gists_url":"https://api.github.com/users/teonlamont/gists{/gist_id}","starred_url":"https://api.github.com/users/teonlamont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teonlamont/subscriptions","organizations_url":"https://api.github.com/users/teonlamont/orgs","repos_url":"https://api.github.com/users/teonlamont/repos","events_url":"https://api.github.com/users/teonlamont/events{/privacy}","received_events_url":"https://api.github.com/users/teonlamont/received_events","type":"User","site_admin":false},"repo":{"id":6598396,"name":"mne-python","full_name":"teonlamont/mne-python","owner":{"login":"teonlamont","id":1578674,"avatar_url":"https://avatars.githubusercontent.com/u/1578674?v=3","gravatar_id":"","url":"https://api.github.com/users/teonlamont","html_url":"https://github.com/teonlamont","followers_url":"https://api.github.com/users/teonlamont/followers","following_url":"https://api.github.com/users/teonlamont/following{/other_user}","gists_url":"https://api.github.com/users/teonlamont/gists{/gist_id}","starred_url":"https://api.github.com/users/teonlamont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teonlamont/subscriptions","organizations_url":"https://api.github.com/users/teonlamont/orgs","repos_url":"https://api.github.com/users/teonlamont/repos","events_url":"https://api.github.com/users/teonlamont/events{/privacy}","received_events_url":"https://api.github.com/users/teonlamont/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/teonlamont/mne-python","description":"MNE scripting with Python","fork":true,"url":"https://api.github.com/repos/teonlamont/mne-python","forks_url":"https://api.github.com/repos/teonlamont/mne-python/forks","keys_url":"https://api.github.com/repos/teonlamont/mne-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teonlamont/mne-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teonlamont/mne-python/teams","hooks_url":"https://api.github.com/repos/teonlamont/mne-python/hooks","issue_events_url":"https://api.github.com/repos/teonlamont/mne-python/issues/events{/number}","events_url":"https://api.github.com/repos/teonlamont/mne-python/events","assignees_url":"https://api.github.com/repos/teonlamont/mne-python/assignees{/user}","branches_url":"https://api.github.com/repos/teonlamont/mne-python/branches{/branch}","tags_url":"https://api.github.com/repos/teonlamont/mne-python/tags","blobs_url":"https://api.github.com/repos/teonlamont/mne-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teonlamont/mne-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teonlamont/mne-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/teonlamont/mne-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teonlamont/mne-python/statuses/{sha}","languages_url":"https://api.github.com/repos/teonlamont/mne-python/languages","stargazers_url":"https://api.github.com/repos/teonlamont/mne-python/stargazers","contributors_url":"https://api.github.com/repos/teonlamont/mne-python/contributors","subscribers_url":"https://api.github.com/repos/teonlamont/mne-python/subscribers","subscription_url":"https://api.github.com/repos/teonlamont/mne-python/subscription","commits_url":"https://api.github.com/repos/teonlamont/mne-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/teonlamont/mne-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/teonlamont/mne-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/teonlamont/mne-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/teonlamont/mne-python/contents/{+path}","compare_url":"https://api.github.com/repos/teonlamont/mne-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teonlamont/mne-python/merges","archive_url":"https://api.github.com/repos/teonlamont/mne-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teonlamont/mne-python/downloads","issues_url":"https://api.github.com/repos/teonlamont/mne-python/issues{/number}","pulls_url":"https://api.github.com/repos/teonlamont/mne-python/pulls{/number}","milestones_url":"https://api.github.com/repos/teonlamont/mne-python/milestones{/number}","notifications_url":"https://api.github.com/repos/teonlamont/mne-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teonlamont/mne-python/labels{/name}","releases_url":"https://api.github.com/repos/teonlamont/mne-python/releases{/id}","created_at":"2012-11-08T15:32:25Z","updated_at":"2015-05-06T14:22:04Z","pushed_at":"2015-06-23T23:58:28Z","git_url":"git://github.com/teonlamont/mne-python.git","ssh_url":"git@github.com:teonlamont/mne-python.git","clone_url":"https://github.com/teonlamont/mne-python.git","svn_url":"https://github.com/teonlamont/mne-python","homepage":"http://martinos.org/mne/","size":112718,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mne-tools:master","ref":"master","sha":"3cc7a3f8456d78c828355f1860dd7e0297e59c73","user":{"login":"mne-tools","id":583875,"avatar_url":"https://avatars.githubusercontent.com/u/583875?v=3","gravatar_id":"","url":"https://api.github.com/users/mne-tools","html_url":"https://github.com/mne-tools","followers_url":"https://api.github.com/users/mne-tools/followers","following_url":"https://api.github.com/users/mne-tools/following{/other_user}","gists_url":"https://api.github.com/users/mne-tools/gists{/gist_id}","starred_url":"https://api.github.com/users/mne-tools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mne-tools/subscriptions","organizations_url":"https://api.github.com/users/mne-tools/orgs","repos_url":"https://api.github.com/users/mne-tools/repos","events_url":"https://api.github.com/users/mne-tools/events{/privacy}","received_events_url":"https://api.github.com/users/mne-tools/received_events","type":"Organization","site_admin":false},"repo":{"id":1301584,"name":"mne-python","full_name":"mne-tools/mne-python","owner":{"login":"mne-tools","id":583875,"avatar_url":"https://avatars.githubusercontent.com/u/583875?v=3","gravatar_id":"","url":"https://api.github.com/users/mne-tools","html_url":"https://github.com/mne-tools","followers_url":"https://api.github.com/users/mne-tools/followers","following_url":"https://api.github.com/users/mne-tools/following{/other_user}","gists_url":"https://api.github.com/users/mne-tools/gists{/gist_id}","starred_url":"https://api.github.com/users/mne-tools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mne-tools/subscriptions","organizations_url":"https://api.github.com/users/mne-tools/orgs","repos_url":"https://api.github.com/users/mne-tools/repos","events_url":"https://api.github.com/users/mne-tools/events{/privacy}","received_events_url":"https://api.github.com/users/mne-tools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mne-tools/mne-python","description":"MNE : Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python","fork":false,"url":"https://api.github.com/repos/mne-tools/mne-python","forks_url":"https://api.github.com/repos/mne-tools/mne-python/forks","keys_url":"https://api.github.com/repos/mne-tools/mne-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mne-tools/mne-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mne-tools/mne-python/teams","hooks_url":"https://api.github.com/repos/mne-tools/mne-python/hooks","issue_events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/events{/number}","events_url":"https://api.github.com/repos/mne-tools/mne-python/events","assignees_url":"https://api.github.com/repos/mne-tools/mne-python/assignees{/user}","branches_url":"https://api.github.com/repos/mne-tools/mne-python/branches{/branch}","tags_url":"https://api.github.com/repos/mne-tools/mne-python/tags","blobs_url":"https://api.github.com/repos/mne-tools/mne-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mne-tools/mne-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mne-tools/mne-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/mne-tools/mne-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mne-tools/mne-python/statuses/{sha}","languages_url":"https://api.github.com/repos/mne-tools/mne-python/languages","stargazers_url":"https://api.github.com/repos/mne-tools/mne-python/stargazers","contributors_url":"https://api.github.com/repos/mne-tools/mne-python/contributors","subscribers_url":"https://api.github.com/repos/mne-tools/mne-python/subscribers","subscription_url":"https://api.github.com/repos/mne-tools/mne-python/subscription","commits_url":"https://api.github.com/repos/mne-tools/mne-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/mne-tools/mne-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/mne-tools/mne-python/contents/{+path}","compare_url":"https://api.github.com/repos/mne-tools/mne-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mne-tools/mne-python/merges","archive_url":"https://api.github.com/repos/mne-tools/mne-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mne-tools/mne-python/downloads","issues_url":"https://api.github.com/repos/mne-tools/mne-python/issues{/number}","pulls_url":"https://api.github.com/repos/mne-tools/mne-python/pulls{/number}","milestones_url":"https://api.github.com/repos/mne-tools/mne-python/milestones{/number}","notifications_url":"https://api.github.com/repos/mne-tools/mne-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mne-tools/mne-python/labels{/name}","releases_url":"https://api.github.com/repos/mne-tools/mne-python/releases{/id}","created_at":"2011-01-28T03:31:13Z","updated_at":"2015-06-24T00:43:44Z","pushed_at":"2015-06-24T00:02:58Z","git_url":"git://github.com/mne-tools/mne-python.git","ssh_url":"git@github.com:mne-tools/mne-python.git","clone_url":"https://github.com/mne-tools/mne-python.git","svn_url":"https://github.com/mne-tools/mne-python","homepage":"http://martinos.org/mne/","size":178741,"stargazers_count":131,"watchers_count":131,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":126,"mirror_url":null,"open_issues_count":166,"forks":126,"open_issues":166,"watchers":131,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2234"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/2234"},"issue":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/2234"},"comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/2234/comments"},"review_comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2234/comments"},"review_comment":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2234/commits"},"statuses":{"href":"https://api.github.com/repos/mne-tools/mne-python/statuses/ec0a24f24fd59c567fe6278fe394f9c207641ffc"}}}}