{"action":"created","issue":{"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/878","repository_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz","labels_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/878/labels{/name}","comments_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/878/comments","events_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/878/events","html_url":"https://github.com/matlab2tikz/matlab2tikz/issues/878","id":145987764,"number":878,"title":"bar3 issues with manual solution and examples","user":{"login":"elektronxyz","id":15018040,"avatar_url":"https://avatars.githubusercontent.com/u/15018040?v=3","gravatar_id":"","url":"https://api.github.com/users/elektronxyz","html_url":"https://github.com/elektronxyz","followers_url":"https://api.github.com/users/elektronxyz/followers","following_url":"https://api.github.com/users/elektronxyz/following{/other_user}","gists_url":"https://api.github.com/users/elektronxyz/gists{/gist_id}","starred_url":"https://api.github.com/users/elektronxyz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elektronxyz/subscriptions","organizations_url":"https://api.github.com/users/elektronxyz/orgs","repos_url":"https://api.github.com/users/elektronxyz/repos","events_url":"https://api.github.com/users/elektronxyz/events{/privacy}","received_events_url":"https://api.github.com/users/elektronxyz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/labels/+0.1.0","name":"+0.1.0","color":"d3d7cf"},{"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/labels/3D%20plots","name":"3D plots","color":"fcaf3e"},{"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":6,"created_at":"2016-04-05T13:23:43Z","updated_at":"2016-04-05T14:31:35Z","closed_at":null,"body":"I wanted to produce some bar3 plots with colorbar. To avoid unprintable documents a decided to use the shader=flat corner option.\r\n\r\nHere is an matlab example:\r\n\r\n```matlab\r\nfig = figure('Name','Example bar3','Position',[50 50 800 523]);\r\n\r\nfor x = [1:1:3]\r\n    for y = [1:1:3]\r\n        data(x,y) = 10 - x * y;\r\n    end\r\nend\r\n\r\nbox on;\r\ngrid on;\r\n\r\nhbar = bar3(data);\r\nview([52.5, 30]);\r\n\r\ncolormap('jet');\r\nhcol = colorbar;\r\n\r\nfor k = 1:length(hbar)\r\n    zdata = hbar(k).ZData;\r\n    hbar(k).CData = zdata;\r\n    hbar(k).FaceColor = 'flat';\r\nend\r\n```\r\n\r\nProducing the following figure:\r\n![example](https://cloud.githubusercontent.com/assets/15018040/14282795/55acbda4-fb40-11e5-8b59-94d4b80861bb.png)\r\n\r\nThe current development version of Matlab2tikz produces the following code:\r\n[example.tikz.txt](https://github.com/matlab2tikz/matlab2tikz/files/204511/example.tikz.txt)\r\n\r\nThe compiled picture is not usable.\r\n![example-tikz](https://cloud.githubusercontent.com/assets/15018040/14282999/80a62c4c-fb41-11e5-9ab8-f9d677054c4a.png)\r\n\r\nTherefore, I removed the `z butter` statements with the following result.\r\n![example-tikz-without-z-buffer](https://cloud.githubusercontent.com/assets/15018040/14283029/a5080c68-fb41-11e5-8b21-f07309523128.png)\r\n\r\nTo get the desired results, I had to place some entries with `nan`. \r\nPlease have a look in the tikz file.\r\n[example-edit-working.tikz.txt](https://github.com/matlab2tikz/matlab2tikz/files/204516/example-edit-working.tikz.txt)\r\n  \r\nNow, it looks like the matlab example.\r\n![example-tikz-without-z-buffer-and-removed-entries](https://cloud.githubusercontent.com/assets/15018040/14283087/f044d990-fb41-11e5-97d6-61ec8b577477.png)\r\n\r\nThis manual solution is not adequate for large pictures. Therefore, I would like to ask, if it is possible to change matlab2tikz in the proposed manner.\r\n\r\nBest regards,\r\n  Elektron \r\n\r\n \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/comments/205834405","html_url":"https://github.com/matlab2tikz/matlab2tikz/issues/878#issuecomment-205834405","issue_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/878","id":205834405,"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},"created_at":"2016-04-05T14:31:35Z","updated_at":"2016-04-05T14:31:35Z","body":"Yeah, i dont know why, but it just seems, that the ordering of the individual patches is off, even with reverse odering. I think it might be best to switch to z buffer=auto and then remove the ground plane?"}}