{"action":"created","comment":{"url":"https://api.github.com/repos/plotly/plotly.py/pulls/comments/66908329","id":66908329,"diff_hunk":"@@ -236,13 +280,32 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',\n \n     display(HTML(plot_html))\n \n+    if image:\n+        if image not in __IMAGE_FORMATS:\n+            raise ValueError('The image parameter takes only the '\n+                             'following format types: `png`, `jpeg`, '\n+                             '`webp`, `svg`')\n+        # if the check passes then download script injection will commence.\n+        # Write script to download image of the plot\n+        script = image_download_script('iplot').format(format=image,\n+                                                       width=image_width,\n+                                                       height=image_height,\n+                                                       filename=filename,\n+                                                       plot_id=plotdivid)\n+        # allow time for the plot to draw\n+        import time","path":"plotly/offline/offline.py","position":null,"original_position":111,"commit_id":"0582283355281566f226079178bf6ddf1d8fc97d","original_commit_id":"e943120d6838d4f3c9fbd3e2341472b1d31315b5","user":{"login":"theengineear","id":6611546,"avatar_url":"https://avatars.githubusercontent.com/u/6611546?v=3","gravatar_id":"","url":"https://api.github.com/users/theengineear","html_url":"https://github.com/theengineear","followers_url":"https://api.github.com/users/theengineear/followers","following_url":"https://api.github.com/users/theengineear/following{/other_user}","gists_url":"https://api.github.com/users/theengineear/gists{/gist_id}","starred_url":"https://api.github.com/users/theengineear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theengineear/subscriptions","organizations_url":"https://api.github.com/users/theengineear/orgs","repos_url":"https://api.github.com/users/theengineear/repos","events_url":"https://api.github.com/users/theengineear/events{/privacy}","received_events_url":"https://api.github.com/users/theengineear/received_events","type":"User","site_admin":false},"body":"Yah, exactly it's faster to put it at the top, it's also better Python style. Here's a quick note on it:\r\n","created_at":"2016-06-14T04:49:22Z","updated_at":"2016-06-14T04:49:22Z","html_url":"https://github.com/plotly/plotly.py/pull/494#discussion_r66908329","pull_request_url":"https://api.github.com/repos/plotly/plotly.py/pulls/494","_links":{"self":{"href":"https://api.github.com/repos/plotly/plotly.py/pulls/comments/66908329"},"html":{"href":"https://github.com/plotly/plotly.py/pull/494#discussion_r66908329"},"pull_request":{"href":"https://api.github.com/repos/plotly/plotly.py/pulls/494"}}},"pull_request":{"url":"https://api.github.com/repos/plotly/plotly.py/pulls/494","id":72400239,"html_url":"https://github.com/plotly/plotly.py/pull/494","diff_url":"https://github.com/plotly/plotly.py/pull/494.diff","patch_url":"https://github.com/plotly/plotly.py/pull/494.patch","issue_url":"https://api.github.com/repos/plotly/plotly.py/issues/494","number":494,"state":"open","locked":false,"title":"added option to download an image of the most recent plot","user":{"login":"yankev","id":12302455,"avatar_url":"https://avatars.githubusercontent.com/u/12302455?v=3","gravatar_id":"","url":"https://api.github.com/users/yankev","html_url":"https://github.com/yankev","followers_url":"https://api.github.com/users/yankev/followers","following_url":"https://api.github.com/users/yankev/following{/other_user}","gists_url":"https://api.github.com/users/yankev/gists{/gist_id}","starred_url":"https://api.github.com/users/yankev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yankev/subscriptions","organizations_url":"https://api.github.com/users/yankev/orgs","repos_url":"https://api.github.com/users/yankev/repos","events_url":"https://api.github.com/users/yankev/events{/privacy}","received_events_url":"https://api.github.com/users/yankev/received_events","type":"User","site_admin":false},"body":"- This change is for the offline notebook mode\r\n- This is the first attempt at it, there may be better solutions that I plan to look at\r\n- Need to add docstring\r\n","created_at":"2016-06-02T19:06:14Z","updated_at":"2016-06-14T04:49:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5929fda0aec7ee7aae785d8b2269674b46202d5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/plotly/plotly.py/pulls/494/commits","review_comments_url":"https://api.github.com/repos/plotly/plotly.py/pulls/494/comments","review_comment_url":"https://api.github.com/repos/plotly/plotly.py/pulls/comments{/number}","comments_url":"https://api.github.com/repos/plotly/plotly.py/issues/494/comments","statuses_url":"https://api.github.com/repos/plotly/plotly.py/statuses/0582283355281566f226079178bf6ddf1d8fc97d","head":{"label":"plotly:download-image-offline","ref":"download-image-offline","sha":"0582283355281566f226079178bf6ddf1d8fc97d","user":{"login":"plotly","id":5997976,"avatar_url":"https://avatars.githubusercontent.com/u/5997976?v=3","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"repo":{"id":14579099,"name":"plotly.py","full_name":"plotly/plotly.py","owner":{"login":"plotly","id":5997976,"avatar_url":"https://avatars.githubusercontent.com/u/5997976?v=3","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plotly/plotly.py","description":"the browser-based graphing library for python","fork":false,"url":"https://api.github.com/repos/plotly/plotly.py","forks_url":"https://api.github.com/repos/plotly/plotly.py/forks","keys_url":"https://api.github.com/repos/plotly/plotly.py/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plotly/plotly.py/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plotly/plotly.py/teams","hooks_url":"https://api.github.com/repos/plotly/plotly.py/hooks","issue_events_url":"https://api.github.com/repos/plotly/plotly.py/issues/events{/number}","events_url":"https://api.github.com/repos/plotly/plotly.py/events","assignees_url":"https://api.github.com/repos/plotly/plotly.py/assignees{/user}","branches_url":"https://api.github.com/repos/plotly/plotly.py/branches{/branch}","tags_url":"https://api.github.com/repos/plotly/plotly.py/tags","blobs_url":"https://api.github.com/repos/plotly/plotly.py/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plotly/plotly.py/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plotly/plotly.py/git/refs{/sha}","trees_url":"https://api.github.com/repos/plotly/plotly.py/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plotly/plotly.py/statuses/{sha}","languages_url":"https://api.github.com/repos/plotly/plotly.py/languages","stargazers_url":"https://api.github.com/repos/plotly/plotly.py/stargazers","contributors_url":"https://api.github.com/repos/plotly/plotly.py/contributors","subscribers_url":"https://api.github.com/repos/plotly/plotly.py/subscribers","subscription_url":"https://api.github.com/repos/plotly/plotly.py/subscription","commits_url":"https://api.github.com/repos/plotly/plotly.py/commits{/sha}","git_commits_url":"https://api.github.com/repos/plotly/plotly.py/git/commits{/sha}","comments_url":"https://api.github.com/repos/plotly/plotly.py/comments{/number}","issue_comment_url":"https://api.github.com/repos/plotly/plotly.py/issues/comments{/number}","contents_url":"https://api.github.com/repos/plotly/plotly.py/contents/{+path}","compare_url":"https://api.github.com/repos/plotly/plotly.py/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plotly/plotly.py/merges","archive_url":"https://api.github.com/repos/plotly/plotly.py/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plotly/plotly.py/downloads","issues_url":"https://api.github.com/repos/plotly/plotly.py/issues{/number}","pulls_url":"https://api.github.com/repos/plotly/plotly.py/pulls{/number}","milestones_url":"https://api.github.com/repos/plotly/plotly.py/milestones{/number}","notifications_url":"https://api.github.com/repos/plotly/plotly.py/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plotly/plotly.py/labels{/name}","releases_url":"https://api.github.com/repos/plotly/plotly.py/releases{/id}","deployments_url":"https://api.github.com/repos/plotly/plotly.py/deployments","created_at":"2013-11-21T05:53:08Z","updated_at":"2016-06-14T03:31:11Z","pushed_at":"2016-06-14T02:37:29Z","git_url":"git://github.com/plotly/plotly.py.git","ssh_url":"git@github.com:plotly/plotly.py.git","clone_url":"https://github.com/plotly/plotly.py.git","svn_url":"https://github.com/plotly/plotly.py","homepage":"https://plot.ly/python/","size":9721,"stargazers_count":1085,"watchers_count":1085,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":271,"mirror_url":null,"open_issues_count":146,"forks":271,"open_issues":146,"watchers":1085,"default_branch":"master"}},"base":{"label":"plotly:master","ref":"master","sha":"ef9f4ba805a145dbc02c6caa3423d673abab0a04","user":{"login":"plotly","id":5997976,"avatar_url":"https://avatars.githubusercontent.com/u/5997976?v=3","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"repo":{"id":14579099,"name":"plotly.py","full_name":"plotly/plotly.py","owner":{"login":"plotly","id":5997976,"avatar_url":"https://avatars.githubusercontent.com/u/5997976?v=3","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/plotly/plotly.py","description":"the browser-based graphing library for python","fork":false,"url":"https://api.github.com/repos/plotly/plotly.py","forks_url":"https://api.github.com/repos/plotly/plotly.py/forks","keys_url":"https://api.github.com/repos/plotly/plotly.py/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plotly/plotly.py/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plotly/plotly.py/teams","hooks_url":"https://api.github.com/repos/plotly/plotly.py/hooks","issue_events_url":"https://api.github.com/repos/plotly/plotly.py/issues/events{/number}","events_url":"https://api.github.com/repos/plotly/plotly.py/events","assignees_url":"https://api.github.com/repos/plotly/plotly.py/assignees{/user}","branches_url":"https://api.github.com/repos/plotly/plotly.py/branches{/branch}","tags_url":"https://api.github.com/repos/plotly/plotly.py/tags","blobs_url":"https://api.github.com/repos/plotly/plotly.py/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plotly/plotly.py/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plotly/plotly.py/git/refs{/sha}","trees_url":"https://api.github.com/repos/plotly/plotly.py/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plotly/plotly.py/statuses/{sha}","languages_url":"https://api.github.com/repos/plotly/plotly.py/languages","stargazers_url":"https://api.github.com/repos/plotly/plotly.py/stargazers","contributors_url":"https://api.github.com/repos/plotly/plotly.py/contributors","subscribers_url":"https://api.github.com/repos/plotly/plotly.py/subscribers","subscription_url":"https://api.github.com/repos/plotly/plotly.py/subscription","commits_url":"https://api.github.com/repos/plotly/plotly.py/commits{/sha}","git_commits_url":"https://api.github.com/repos/plotly/plotly.py/git/commits{/sha}","comments_url":"https://api.github.com/repos/plotly/plotly.py/comments{/number}","issue_comment_url":"https://api.github.com/repos/plotly/plotly.py/issues/comments{/number}","contents_url":"https://api.github.com/repos/plotly/plotly.py/contents/{+path}","compare_url":"https://api.github.com/repos/plotly/plotly.py/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plotly/plotly.py/merges","archive_url":"https://api.github.com/repos/plotly/plotly.py/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plotly/plotly.py/downloads","issues_url":"https://api.github.com/repos/plotly/plotly.py/issues{/number}","pulls_url":"https://api.github.com/repos/plotly/plotly.py/pulls{/number}","milestones_url":"https://api.github.com/repos/plotly/plotly.py/milestones{/number}","notifications_url":"https://api.github.com/repos/plotly/plotly.py/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plotly/plotly.py/labels{/name}","releases_url":"https://api.github.com/repos/plotly/plotly.py/releases{/id}","deployments_url":"https://api.github.com/repos/plotly/plotly.py/deployments","created_at":"2013-11-21T05:53:08Z","updated_at":"2016-06-14T03:31:11Z","pushed_at":"2016-06-14T02:37:29Z","git_url":"git://github.com/plotly/plotly.py.git","ssh_url":"git@github.com:plotly/plotly.py.git","clone_url":"https://github.com/plotly/plotly.py.git","svn_url":"https://github.com/plotly/plotly.py","homepage":"https://plot.ly/python/","size":9721,"stargazers_count":1085,"watchers_count":1085,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":271,"mirror_url":null,"open_issues_count":146,"forks":271,"open_issues":146,"watchers":1085,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/plotly/plotly.py/pulls/494"},"html":{"href":"https://github.com/plotly/plotly.py/pull/494"},"issue":{"href":"https://api.github.com/repos/plotly/plotly.py/issues/494"},"comments":{"href":"https://api.github.com/repos/plotly/plotly.py/issues/494/comments"},"review_comments":{"href":"https://api.github.com/repos/plotly/plotly.py/pulls/494/comments"},"review_comment":{"href":"https://api.github.com/repos/plotly/plotly.py/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/plotly/plotly.py/pulls/494/commits"},"statuses":{"href":"https://api.github.com/repos/plotly/plotly.py/statuses/0582283355281566f226079178bf6ddf1d8fc97d"}}}}
{"actor":{"display_login":"theengineear"}}