{"action":"closed","number":46,"pull_request":{"url":"https://api.github.com/repos/Calysto/matlab_kernel/pulls/46","id":70059215,"html_url":"https://github.com/Calysto/matlab_kernel/pull/46","diff_url":"https://github.com/Calysto/matlab_kernel/pull/46.diff","patch_url":"https://github.com/Calysto/matlab_kernel/pull/46.patch","issue_url":"https://api.github.com/repos/Calysto/matlab_kernel/issues/46","number":46,"state":"closed","locked":false,"title":"set default figure size as well as paper size","user":{"login":"benjamin-heasly","id":1950775,"avatar_url":"https://avatars.githubusercontent.com/u/1950775?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamin-heasly","html_url":"https://github.com/benjamin-heasly","followers_url":"https://api.github.com/users/benjamin-heasly/followers","following_url":"https://api.github.com/users/benjamin-heasly/following{/other_user}","gists_url":"https://api.github.com/users/benjamin-heasly/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamin-heasly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamin-heasly/subscriptions","organizations_url":"https://api.github.com/users/benjamin-heasly/orgs","repos_url":"https://api.github.com/users/benjamin-heasly/repos","events_url":"https://api.github.com/users/benjamin-heasly/events{/privacy}","received_events_url":"https://api.github.com/users/benjamin-heasly/received_events","type":"User","site_admin":false},"body":"Greetings!\r\n\r\nI'm working with matlab_kernel via pymatbridge to Matlab 2016a on Linux Mint.\r\n\r\nI had some trouble with plotting.  I think I fixed the issue and want to offer up this patch.\r\n\r\n`plot()` and other figure-making commands were causing a Matlab `imwrite()` error about the figure image being way too amusingly huge:\r\n  http://www.mathworks.com/matlabcentral/newsreader/view_thread/327812\r\n\r\nThis happened with or without a `--size` argument to the `%plot` magic.  I could work around this by opening a `figure()` explicitly and setting a small `Position`, like `[0 0 100 100]` in pixel units.\r\n\r\nSo I think the fix is just a matter of setting the default figure size before plotting -- which you're already doing this in the `MatlabKernel`, by setting the `defaultfigurepaperposition`.  I found I had to set the `defaultfigureposition` as well, to make the error go away.\r\n\r\nMaybe the default figure sizing behavior has silently changed between Matlab versions?\r\n\r\nWith this patch, I can execute the `matlab_kernel.ipynb` example, and the figures come out looking like the originals saved in the notebook file.\r\n","created_at":"2016-05-13T21:13:31Z","updated_at":"2016-05-16T14:55:29Z","closed_at":"2016-05-16T14:55:29Z","merged_at":"2016-05-16T14:55:29Z","merge_commit_sha":"0ffcee3ebd5cf308bc6e64756de6a2e927dab202","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Calysto/matlab_kernel/pulls/46/commits","review_comments_url":"https://api.github.com/repos/Calysto/matlab_kernel/pulls/46/comments","review_comment_url":"https://api.github.com/repos/Calysto/matlab_kernel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Calysto/matlab_kernel/issues/46/comments","statuses_url":"https://api.github.com/repos/Calysto/matlab_kernel/statuses/8d7add62f9a0461c5f6bb1f49667a47e4258e2d0","head":{"label":"benjamin-heasly:figureSize","ref":"figureSize","sha":"8d7add62f9a0461c5f6bb1f49667a47e4258e2d0","user":{"login":"benjamin-heasly","id":1950775,"avatar_url":"https://avatars.githubusercontent.com/u/1950775?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamin-heasly","html_url":"https://github.com/benjamin-heasly","followers_url":"https://api.github.com/users/benjamin-heasly/followers","following_url":"https://api.github.com/users/benjamin-heasly/following{/other_user}","gists_url":"https://api.github.com/users/benjamin-heasly/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamin-heasly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamin-heasly/subscriptions","organizations_url":"https://api.github.com/users/benjamin-heasly/orgs","repos_url":"https://api.github.com/users/benjamin-heasly/repos","events_url":"https://api.github.com/users/benjamin-heasly/events{/privacy}","received_events_url":"https://api.github.com/users/benjamin-heasly/received_events","type":"User","site_admin":false},"repo":{"id":58763481,"name":"matlab_kernel","full_name":"benjamin-heasly/matlab_kernel","owner":{"login":"benjamin-heasly","id":1950775,"avatar_url":"https://avatars.githubusercontent.com/u/1950775?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamin-heasly","html_url":"https://github.com/benjamin-heasly","followers_url":"https://api.github.com/users/benjamin-heasly/followers","following_url":"https://api.github.com/users/benjamin-heasly/following{/other_user}","gists_url":"https://api.github.com/users/benjamin-heasly/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamin-heasly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamin-heasly/subscriptions","organizations_url":"https://api.github.com/users/benjamin-heasly/orgs","repos_url":"https://api.github.com/users/benjamin-heasly/repos","events_url":"https://api.github.com/users/benjamin-heasly/events{/privacy}","received_events_url":"https://api.github.com/users/benjamin-heasly/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benjamin-heasly/matlab_kernel","description":"Jupyter Kernel for Matlab","fork":true,"url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel","forks_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/forks","keys_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/teams","hooks_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/hooks","issue_events_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/issues/events{/number}","events_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/events","assignees_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/assignees{/user}","branches_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/branches{/branch}","tags_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/tags","blobs_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/git/refs{/sha}","trees_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/statuses/{sha}","languages_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/languages","stargazers_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/stargazers","contributors_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/contributors","subscribers_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/subscribers","subscription_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/subscription","commits_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/commits{/sha}","git_commits_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/git/commits{/sha}","comments_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/comments{/number}","issue_comment_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/issues/comments{/number}","contents_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/contents/{+path}","compare_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/merges","archive_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/downloads","issues_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/issues{/number}","pulls_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/pulls{/number}","milestones_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/milestones{/number}","notifications_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/labels{/name}","releases_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/releases{/id}","deployments_url":"https://api.github.com/repos/benjamin-heasly/matlab_kernel/deployments","created_at":"2016-05-13T18:28:20Z","updated_at":"2016-05-13T18:28:21Z","pushed_at":"2016-05-13T20:48:22Z","git_url":"git://github.com/benjamin-heasly/matlab_kernel.git","ssh_url":"git@github.com:benjamin-heasly/matlab_kernel.git","clone_url":"https://github.com/benjamin-heasly/matlab_kernel.git","svn_url":"https://github.com/benjamin-heasly/matlab_kernel","homepage":null,"size":340,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Calysto:master","ref":"master","sha":"03e6d47376aae6130b829a56ac16d7117d068672","user":{"login":"Calysto","id":9684179,"avatar_url":"https://avatars.githubusercontent.com/u/9684179?v=3","gravatar_id":"","url":"https://api.github.com/users/Calysto","html_url":"https://github.com/Calysto","followers_url":"https://api.github.com/users/Calysto/followers","following_url":"https://api.github.com/users/Calysto/following{/other_user}","gists_url":"https://api.github.com/users/Calysto/gists{/gist_id}","starred_url":"https://api.github.com/users/Calysto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Calysto/subscriptions","organizations_url":"https://api.github.com/users/Calysto/orgs","repos_url":"https://api.github.com/users/Calysto/repos","events_url":"https://api.github.com/users/Calysto/events{/privacy}","received_events_url":"https://api.github.com/users/Calysto/received_events","type":"Organization","site_admin":false},"repo":{"id":30112103,"name":"matlab_kernel","full_name":"Calysto/matlab_kernel","owner":{"login":"Calysto","id":9684179,"avatar_url":"https://avatars.githubusercontent.com/u/9684179?v=3","gravatar_id":"","url":"https://api.github.com/users/Calysto","html_url":"https://github.com/Calysto","followers_url":"https://api.github.com/users/Calysto/followers","following_url":"https://api.github.com/users/Calysto/following{/other_user}","gists_url":"https://api.github.com/users/Calysto/gists{/gist_id}","starred_url":"https://api.github.com/users/Calysto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Calysto/subscriptions","organizations_url":"https://api.github.com/users/Calysto/orgs","repos_url":"https://api.github.com/users/Calysto/repos","events_url":"https://api.github.com/users/Calysto/events{/privacy}","received_events_url":"https://api.github.com/users/Calysto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Calysto/matlab_kernel","description":"Jupyter Kernel for Matlab","fork":false,"url":"https://api.github.com/repos/Calysto/matlab_kernel","forks_url":"https://api.github.com/repos/Calysto/matlab_kernel/forks","keys_url":"https://api.github.com/repos/Calysto/matlab_kernel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Calysto/matlab_kernel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Calysto/matlab_kernel/teams","hooks_url":"https://api.github.com/repos/Calysto/matlab_kernel/hooks","issue_events_url":"https://api.github.com/repos/Calysto/matlab_kernel/issues/events{/number}","events_url":"https://api.github.com/repos/Calysto/matlab_kernel/events","assignees_url":"https://api.github.com/repos/Calysto/matlab_kernel/assignees{/user}","branches_url":"https://api.github.com/repos/Calysto/matlab_kernel/branches{/branch}","tags_url":"https://api.github.com/repos/Calysto/matlab_kernel/tags","blobs_url":"https://api.github.com/repos/Calysto/matlab_kernel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Calysto/matlab_kernel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Calysto/matlab_kernel/git/refs{/sha}","trees_url":"https://api.github.com/repos/Calysto/matlab_kernel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Calysto/matlab_kernel/statuses/{sha}","languages_url":"https://api.github.com/repos/Calysto/matlab_kernel/languages","stargazers_url":"https://api.github.com/repos/Calysto/matlab_kernel/stargazers","contributors_url":"https://api.github.com/repos/Calysto/matlab_kernel/contributors","subscribers_url":"https://api.github.com/repos/Calysto/matlab_kernel/subscribers","subscription_url":"https://api.github.com/repos/Calysto/matlab_kernel/subscription","commits_url":"https://api.github.com/repos/Calysto/matlab_kernel/commits{/sha}","git_commits_url":"https://api.github.com/repos/Calysto/matlab_kernel/git/commits{/sha}","comments_url":"https://api.github.com/repos/Calysto/matlab_kernel/comments{/number}","issue_comment_url":"https://api.github.com/repos/Calysto/matlab_kernel/issues/comments{/number}","contents_url":"https://api.github.com/repos/Calysto/matlab_kernel/contents/{+path}","compare_url":"https://api.github.com/repos/Calysto/matlab_kernel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Calysto/matlab_kernel/merges","archive_url":"https://api.github.com/repos/Calysto/matlab_kernel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Calysto/matlab_kernel/downloads","issues_url":"https://api.github.com/repos/Calysto/matlab_kernel/issues{/number}","pulls_url":"https://api.github.com/repos/Calysto/matlab_kernel/pulls{/number}","milestones_url":"https://api.github.com/repos/Calysto/matlab_kernel/milestones{/number}","notifications_url":"https://api.github.com/repos/Calysto/matlab_kernel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Calysto/matlab_kernel/labels{/name}","releases_url":"https://api.github.com/repos/Calysto/matlab_kernel/releases{/id}","deployments_url":"https://api.github.com/repos/Calysto/matlab_kernel/deployments","created_at":"2015-01-31T12:51:06Z","updated_at":"2016-05-15T07:32:15Z","pushed_at":"2016-05-16T14:55:29Z","git_url":"git://github.com/Calysto/matlab_kernel.git","ssh_url":"git@github.com:Calysto/matlab_kernel.git","clone_url":"https://github.com/Calysto/matlab_kernel.git","svn_url":"https://github.com/Calysto/matlab_kernel","homepage":null,"size":341,"stargazers_count":52,"watchers_count":52,"language":"Jupyter Notebook","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":15,"forks":14,"open_issues":15,"watchers":52,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Calysto/matlab_kernel/pulls/46"},"html":{"href":"https://github.com/Calysto/matlab_kernel/pull/46"},"issue":{"href":"https://api.github.com/repos/Calysto/matlab_kernel/issues/46"},"comments":{"href":"https://api.github.com/repos/Calysto/matlab_kernel/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/Calysto/matlab_kernel/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/Calysto/matlab_kernel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Calysto/matlab_kernel/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/Calysto/matlab_kernel/statuses/8d7add62f9a0461c5f6bb1f49667a47e4258e2d0"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"blink1073","id":2096628,"avatar_url":"https://avatars.githubusercontent.com/u/2096628?v=3","gravatar_id":"","url":"https://api.github.com/users/blink1073","html_url":"https://github.com/blink1073","followers_url":"https://api.github.com/users/blink1073/followers","following_url":"https://api.github.com/users/blink1073/following{/other_user}","gists_url":"https://api.github.com/users/blink1073/gists{/gist_id}","starred_url":"https://api.github.com/users/blink1073/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blink1073/subscriptions","organizations_url":"https://api.github.com/users/blink1073/orgs","repos_url":"https://api.github.com/users/blink1073/repos","events_url":"https://api.github.com/users/blink1073/events{/privacy}","received_events_url":"https://api.github.com/users/blink1073/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":1,"additions":4,"deletions":2,"changed_files":1}}