{"action":"created","comment":{"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/pulls/comments/41896436","id":41896436,"diff_hunk":"@@ -939,6 +939,30 @@ function removeNaNs(meta, handle)\n     topRight    = [xLim(2); yLim(2)];\n end\n % =========================================================================\n+function data = limitPrecision(data)\n+  % Limit the precision of the given data\n+  \n+  % Only do something if the data is not empty\n+  if isempty(data) || all(~isfinite(data))\n+      return\n+  end\n+  \n+  % Only consider finite values\n+  mask = isfinite(data);\n+\n+  % Get the maximal value of the data\n+  range = max(abs(data(mask)));","path":"src/cleanfigure.m","position":29,"original_position":29,"commit_id":"26da5304703e6ed8e7054c4338f8ff1815aedbcf","original_commit_id":"26da5304703e6ed8e7054c4338f8ff1815aedbcf","user":{"login":"okomarov","id":3731173,"avatar_url":"https://avatars.githubusercontent.com/u/3731173?v=3","gravatar_id":"","url":"https://api.github.com/users/okomarov","html_url":"https://github.com/okomarov","followers_url":"https://api.github.com/users/okomarov/followers","following_url":"https://api.github.com/users/okomarov/following{/other_user}","gists_url":"https://api.github.com/users/okomarov/gists{/gist_id}","starred_url":"https://api.github.com/users/okomarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okomarov/subscriptions","organizations_url":"https://api.github.com/users/okomarov/orgs","repos_url":"https://api.github.com/users/okomarov/repos","events_url":"https://api.github.com/users/okomarov/events{/privacy}","received_events_url":"https://api.github.com/users/okomarov/received_events","type":"User","site_admin":false},"body":"Can we rename `range` into something else, e.g. `amax`, since by definition `range = max-min`? ","created_at":"2015-10-13T17:20:18Z","updated_at":"2015-10-13T17:20:18Z","html_url":"https://github.com/matlab2tikz/matlab2tikz/pull/791#discussion_r41896436","pull_request_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/pulls/791","_links":{"self":{"href":"https://api.github.com/repos/matlab2tikz/matlab2tikz/pulls/comments/41896436"},"html":{"href":"https://github.com/matlab2tikz/matlab2tikz/pull/791#discussion_r41896436"},"pull_request":{"href":"https://api.github.com/repos/matlab2tikz/matlab2tikz/pulls/791"}}},"pull_request":{"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/pulls/791","id":47547485,"html_url":"https://github.com/matlab2tikz/matlab2tikz/pull/791","diff_url":"https://github.com/matlab2tikz/matlab2tikz/pull/791.diff","patch_url":"https://github.com/matlab2tikz/matlab2tikz/pull/791.patch","issue_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/791","number":791,"state":"open","locked":false,"title":"Limit the precision of the data","user":{"login":"miscco","id":3017120,"avatar_url":"https://avatars.githubusercontent.com/u/3017120?v=3","gravatar_id":"","url":"https://api.github.com/users/miscco","html_url":"https://github.com/miscco","followers_url":"https://api.github.com/users/miscco/followers","following_url":"https://api.github.com/users/miscco/following{/other_user}","gists_url":"https://api.github.com/users/miscco/gists{/gist_id}","starred_url":"https://api.github.com/users/miscco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miscco/subscriptions","organizations_url":"https://api.github.com/users/miscco/orgs","repos_url":"https://api.github.com/users/miscco/repos","events_url":"https://api.github.com/users/miscco/events{/privacy}","received_events_url":"https://api.github.com/users/miscco/received_events","type":"User","site_admin":false},"body":"So a big bonus of the previous restructuring of the code is, that the limiting of the precision becomes rather easy.\r\n\r\nThis is a rebased version of #758","created_at":"2015-10-13T15:20:19Z","updated_at":"2015-10-13T17:20:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25a1f5c4e2f0aed32cf31a46d1b4d170314ca371","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/pulls/791/commits","review_comments_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/pulls/791/comments","review_comment_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/791/comments","statuses_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/statuses/26da5304703e6ed8e7054c4338f8ff1815aedbcf","head":{"label":"miscco:Cleanfigure_Precision_rebased","ref":"Cleanfigure_Precision_rebased","sha":"26da5304703e6ed8e7054c4338f8ff1815aedbcf","user":{"login":"miscco","id":3017120,"avatar_url":"https://avatars.githubusercontent.com/u/3017120?v=3","gravatar_id":"","url":"https://api.github.com/users/miscco","html_url":"https://github.com/miscco","followers_url":"https://api.github.com/users/miscco/followers","following_url":"https://api.github.com/users/miscco/following{/other_user}","gists_url":"https://api.github.com/users/miscco/gists{/gist_id}","starred_url":"https://api.github.com/users/miscco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miscco/subscriptions","organizations_url":"https://api.github.com/users/miscco/orgs","repos_url":"https://api.github.com/users/miscco/repos","events_url":"https://api.github.com/users/miscco/events{/privacy}","received_events_url":"https://api.github.com/users/miscco/received_events","type":"User","site_admin":false},"repo":{"id":41079586,"name":"matlab2tikz","full_name":"miscco/matlab2tikz","owner":{"login":"miscco","id":3017120,"avatar_url":"https://avatars.githubusercontent.com/u/3017120?v=3","gravatar_id":"","url":"https://api.github.com/users/miscco","html_url":"https://github.com/miscco","followers_url":"https://api.github.com/users/miscco/followers","following_url":"https://api.github.com/users/miscco/following{/other_user}","gists_url":"https://api.github.com/users/miscco/gists{/gist_id}","starred_url":"https://api.github.com/users/miscco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miscco/subscriptions","organizations_url":"https://api.github.com/users/miscco/orgs","repos_url":"https://api.github.com/users/miscco/repos","events_url":"https://api.github.com/users/miscco/events{/privacy}","received_events_url":"https://api.github.com/users/miscco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/miscco/matlab2tikz","description":"This program converts MATLAB®/Octave figures to TikZ/pgfplots figures for smooth integration into LaTeX.","fork":true,"url":"https://api.github.com/repos/miscco/matlab2tikz","forks_url":"https://api.github.com/repos/miscco/matlab2tikz/forks","keys_url":"https://api.github.com/repos/miscco/matlab2tikz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/miscco/matlab2tikz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/miscco/matlab2tikz/teams","hooks_url":"https://api.github.com/repos/miscco/matlab2tikz/hooks","issue_events_url":"https://api.github.com/repos/miscco/matlab2tikz/issues/events{/number}","events_url":"https://api.github.com/repos/miscco/matlab2tikz/events","assignees_url":"https://api.github.com/repos/miscco/matlab2tikz/assignees{/user}","branches_url":"https://api.github.com/repos/miscco/matlab2tikz/branches{/branch}","tags_url":"https://api.github.com/repos/miscco/matlab2tikz/tags","blobs_url":"https://api.github.com/repos/miscco/matlab2tikz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/miscco/matlab2tikz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/miscco/matlab2tikz/git/refs{/sha}","trees_url":"https://api.github.com/repos/miscco/matlab2tikz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/miscco/matlab2tikz/statuses/{sha}","languages_url":"https://api.github.com/repos/miscco/matlab2tikz/languages","stargazers_url":"https://api.github.com/repos/miscco/matlab2tikz/stargazers","contributors_url":"https://api.github.com/repos/miscco/matlab2tikz/contributors","subscribers_url":"https://api.github.com/repos/miscco/matlab2tikz/subscribers","subscription_url":"https://api.github.com/repos/miscco/matlab2tikz/subscription","commits_url":"https://api.github.com/repos/miscco/matlab2tikz/commits{/sha}","git_commits_url":"https://api.github.com/repos/miscco/matlab2tikz/git/commits{/sha}","comments_url":"https://api.github.com/repos/miscco/matlab2tikz/comments{/number}","issue_comment_url":"https://api.github.com/repos/miscco/matlab2tikz/issues/comments{/number}","contents_url":"https://api.github.com/repos/miscco/matlab2tikz/contents/{+path}","compare_url":"https://api.github.com/repos/miscco/matlab2tikz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/miscco/matlab2tikz/merges","archive_url":"https://api.github.com/repos/miscco/matlab2tikz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/miscco/matlab2tikz/downloads","issues_url":"https://api.github.com/repos/miscco/matlab2tikz/issues{/number}","pulls_url":"https://api.github.com/repos/miscco/matlab2tikz/pulls{/number}","milestones_url":"https://api.github.com/repos/miscco/matlab2tikz/milestones{/number}","notifications_url":"https://api.github.com/repos/miscco/matlab2tikz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/miscco/matlab2tikz/labels{/name}","releases_url":"https://api.github.com/repos/miscco/matlab2tikz/releases{/id}","created_at":"2015-08-20T06:33:40Z","updated_at":"2015-08-20T06:33:41Z","pushed_at":"2015-10-13T15:33:53Z","git_url":"git://github.com/miscco/matlab2tikz.git","ssh_url":"git@github.com:miscco/matlab2tikz.git","clone_url":"https://github.com/miscco/matlab2tikz.git","svn_url":"https://github.com/miscco/matlab2tikz","homepage":"http://www.mathworks.com/matlabcentral/fileexchange/22022-matlab2tikz","size":7208,"stargazers_count":0,"watchers_count":0,"language":"Matlab","has_issues":false,"has_downloads":false,"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":"matlab2tikz:develop","ref":"develop","sha":"50d34477044501f57c5cd5bdfef78b20657c71ca","user":{"login":"matlab2tikz","id":10036397,"avatar_url":"https://avatars.githubusercontent.com/u/10036397?v=3","gravatar_id":"","url":"https://api.github.com/users/matlab2tikz","html_url":"https://github.com/matlab2tikz","followers_url":"https://api.github.com/users/matlab2tikz/followers","following_url":"https://api.github.com/users/matlab2tikz/following{/other_user}","gists_url":"https://api.github.com/users/matlab2tikz/gists{/gist_id}","starred_url":"https://api.github.com/users/matlab2tikz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matlab2tikz/subscriptions","organizations_url":"https://api.github.com/users/matlab2tikz/orgs","repos_url":"https://api.github.com/users/matlab2tikz/repos","events_url":"https://api.github.com/users/matlab2tikz/events{/privacy}","received_events_url":"https://api.github.com/users/matlab2tikz/received_events","type":"Organization","site_admin":false},"repo":{"id":579842,"name":"matlab2tikz","full_name":"matlab2tikz/matlab2tikz","owner":{"login":"matlab2tikz","id":10036397,"avatar_url":"https://avatars.githubusercontent.com/u/10036397?v=3","gravatar_id":"","url":"https://api.github.com/users/matlab2tikz","html_url":"https://github.com/matlab2tikz","followers_url":"https://api.github.com/users/matlab2tikz/followers","following_url":"https://api.github.com/users/matlab2tikz/following{/other_user}","gists_url":"https://api.github.com/users/matlab2tikz/gists{/gist_id}","starred_url":"https://api.github.com/users/matlab2tikz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matlab2tikz/subscriptions","organizations_url":"https://api.github.com/users/matlab2tikz/orgs","repos_url":"https://api.github.com/users/matlab2tikz/repos","events_url":"https://api.github.com/users/matlab2tikz/events{/privacy}","received_events_url":"https://api.github.com/users/matlab2tikz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/matlab2tikz/matlab2tikz","description":"This program converts MATLAB®/Octave figures to TikZ/pgfplots figures for smooth integration into LaTeX.","fork":false,"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz","forks_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/forks","keys_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/teams","hooks_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/hooks","issue_events_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/events{/number}","events_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/events","assignees_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/assignees{/user}","branches_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/branches{/branch}","tags_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/tags","blobs_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/git/refs{/sha}","trees_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/statuses/{sha}","languages_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/languages","stargazers_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/stargazers","contributors_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/contributors","subscribers_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/subscribers","subscription_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/subscription","commits_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/commits{/sha}","git_commits_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/git/commits{/sha}","comments_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/comments{/number}","issue_comment_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/comments{/number}","contents_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/contents/{+path}","compare_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/merges","archive_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/downloads","issues_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues{/number}","pulls_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/pulls{/number}","milestones_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/milestones{/number}","notifications_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/labels{/name}","releases_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/releases{/id}","created_at":"2010-03-25T22:52:27Z","updated_at":"2015-10-12T17:25:53Z","pushed_at":"2015-10-13T15:33:54Z","git_url":"git://github.com/matlab2tikz/matlab2tikz.git","ssh_url":"git@github.com:matlab2tikz/matlab2tikz.git","clone_url":"https://github.com/matlab2tikz/matlab2tikz.git","svn_url":"https://github.com/matlab2tikz/matlab2tikz","homepage":"http://www.mathworks.com/matlabcentral/fileexchange/22022-matlab2tikz","size":10528,"stargazers_count":310,"watchers_count":310,"language":"Matlab","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":90,"mirror_url":null,"open_issues_count":105,"forks":90,"open_issues":105,"watchers":310,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matlab2tikz/matlab2tikz/pulls/791"},"html":{"href":"https://github.com/matlab2tikz/matlab2tikz/pull/791"},"issue":{"href":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/791"},"comments":{"href":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/791/comments"},"review_comments":{"href":"https://api.github.com/repos/matlab2tikz/matlab2tikz/pulls/791/comments"},"review_comment":{"href":"https://api.github.com/repos/matlab2tikz/matlab2tikz/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matlab2tikz/matlab2tikz/pulls/791/commits"},"statuses":{"href":"https://api.github.com/repos/matlab2tikz/matlab2tikz/statuses/26da5304703e6ed8e7054c4338f8ff1815aedbcf"}}}}