{"action":"created","issue":{"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/840","labels_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/840/labels{/name}","comments_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/840/comments","events_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/840/events","html_url":"https://github.com/matlab2tikz/matlab2tikz/issues/840","id":125625568,"number":840,"title":"Bar plot with small Y-Range","user":{"login":"SimonEbner","id":570249,"avatar_url":"https://avatars.githubusercontent.com/u/570249?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonEbner","html_url":"https://github.com/SimonEbner","followers_url":"https://api.github.com/users/SimonEbner/followers","following_url":"https://api.github.com/users/SimonEbner/following{/other_user}","gists_url":"https://api.github.com/users/SimonEbner/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonEbner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonEbner/subscriptions","organizations_url":"https://api.github.com/users/SimonEbner/orgs","repos_url":"https://api.github.com/users/SimonEbner/repos","events_url":"https://api.github.com/users/SimonEbner/events{/privacy}","received_events_url":"https://api.github.com/users/SimonEbner/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/labels/+0.0.1","name":"+0.0.1","color":"d3d7cf"},{"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/labels/ready-for-action","name":"ready-for-action","color":"eeeeec"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-08T14:49:52Z","updated_at":"2016-01-26T20:10:10Z","closed_at":null,"body":"I noticed matlab2tikz has an issue when the Y-Range of values used in a bar-plot is small. The following matlab code\r\n\r\n```\r\nfilepath =  ...\r\nY1 = randn(100,1);\r\nY2 = 1e-5*Y1;\r\n% Std: 1\r\nsubplot( 121 );\r\n[N, x] = hist(Y1, 15);\r\nbar(x,N);\r\n% Std: 1e-5\r\nsubplot( 122 );\r\n[N, x] = hist(Y2, 15);\r\nbar(x,N);\r\n\r\nmatlab2tikz( filepath, 'parseStrings', false, ...\r\n    'ExtraAxisOptions', 'xlabel near ticks, ylabel near ticks', ...\r\n    'showInfo', false, ...\r\n    'standalone', true );\r\n```\r\n\r\nproduces these matlab plots\r\n![matlab](https://cloud.githubusercontent.com/assets/570249/12200488/5a4e61d4-b61f-11e5-9753-8345f22d280c.png)\r\n\r\nbut the corresponding tikz image looks like this:\r\n![screenshot from 2016-01-08 15 49 39](https://cloud.githubusercontent.com/assets/570249/12200504/7253506e-b61f-11e5-9d5f-660b6c2640b1.png)\r\n\r\nTested on: Ubuntu 14.04, Matlab R2015b, pgfplots 1.10"},"comment":{"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/comments/175205239","html_url":"https://github.com/matlab2tikz/matlab2tikz/issues/840#issuecomment-175205239","issue_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/840","id":175205239,"user":{"login":"SimonEbner","id":570249,"avatar_url":"https://avatars.githubusercontent.com/u/570249?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonEbner","html_url":"https://github.com/SimonEbner","followers_url":"https://api.github.com/users/SimonEbner/followers","following_url":"https://api.github.com/users/SimonEbner/following{/other_user}","gists_url":"https://api.github.com/users/SimonEbner/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonEbner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonEbner/subscriptions","organizations_url":"https://api.github.com/users/SimonEbner/orgs","repos_url":"https://api.github.com/users/SimonEbner/repos","events_url":"https://api.github.com/users/SimonEbner/events{/privacy}","received_events_url":"https://api.github.com/users/SimonEbner/received_events","type":"User","site_admin":false},"created_at":"2016-01-26T20:10:10Z","updated_at":"2016-01-26T20:10:10Z","body":"Thank you very much for the update. I will workaround as proposed by you.\nAm 26.01.2016 21:06 schrieb \"Michael Schellenberger Costa\" <\nnotifications@github.com>:\n\n> So i looked a bit into that and the problem seems to be the lack of\n> precision within LaTeX. Currently we only consider the first three digits\n> (formatDim), which i this case leads to a barwidth of 0.\n>\n> However, manually editing the war width to the calculated value (2.8e-06)\n> doesnt fix the problem, so i believe this is intrinsic to LaTeX. I bet the\n> simplest solution would be to increase the XData by e5 and fake the xlabels\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/matlab2tikz/matlab2tikz/issues/840#issuecomment-175203952>\n> .\n>\n"}}