{"id":612,"date":"2019-09-13T08:33:35","date_gmt":"2019-09-13T12:33:35","guid":{"rendered":"http:\/\/jaewon.hwang.info\/jaewon\/?p=612"},"modified":"2019-09-20T08:25:02","modified_gmt":"2019-09-20T12:25:02","slug":"add-the-data-exploration-buttons-back-to-the-figure-toolbar-in-matlab-r2018b-or-larer","status":"publish","type":"post","link":"https:\/\/jaewon.hwang.info\/jaewon\/2019\/09\/add-the-data-exploration-buttons-back-to-the-figure-toolbar-in-matlab-r2018b-or-larer\/","title":{"rendered":"Add the data exploration buttons back to the figure toolbar in MATLAB R2018b or larer"},"content":{"rendered":"\n<p>In R2018b and later, the data exploration buttons (zoom in, zoom out, etc.) were moved from the figure toolbar to the axes toolbar. I use those buttons all the time, so this change is really annoying.  What is relieving is that you can use the <em>addToolbarExplorationButtons<\/em> and <em>removeToolbarExplorationButton<\/em>s functions to bring the buttons back to the figure toolbar.<\/p>\n\n\n\n<pre class=\"brush: matlab; toolbar: false;\">fig = figure;\nsurf(peaks);\n\naddToolbarExplorationButtons(fig);     % add zoom buttons to the figure toolbar\nremoveToolbarExplorationButtons(fig);  % Remove the buttons from the figure toolbar<\/pre>\n\n\n\n<p>The functions work for the specified figure only.  If you want to open all figures with the data exploration buttons, put the following code in the startup.m<\/p>\n\n\n\n<pre class=\"brush: matlab; toolbar: false;\">set(groot,'defaultFigureCreateFcn',@(fig,~)addToolbarExplorationButtons(fig));\nset(groot,'defaultAxesCreateFcn',@(ax,~)set(ax.Toolbar,'Visible','off'));<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In R2018b and later, the data exploration buttons (zoom in, zoom out, etc.) were moved from the figure toolbar to the axes toolbar. I use those buttons all the time, so this change is really annoying. What is relieving is that you can use the addToolbarExplorationButtons and removeToolbarExplorationButtons functions to bring the buttons back to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[77],"class_list":["post-612","post","type-post","status-publish","format-standard","hentry","category-computer","tag-matlab"],"_links":{"self":[{"href":"https:\/\/jaewon.hwang.info\/jaewon\/wp-json\/wp\/v2\/posts\/612","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaewon.hwang.info\/jaewon\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaewon.hwang.info\/jaewon\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaewon.hwang.info\/jaewon\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaewon.hwang.info\/jaewon\/wp-json\/wp\/v2\/comments?post=612"}],"version-history":[{"count":0,"href":"https:\/\/jaewon.hwang.info\/jaewon\/wp-json\/wp\/v2\/posts\/612\/revisions"}],"wp:attachment":[{"href":"https:\/\/jaewon.hwang.info\/jaewon\/wp-json\/wp\/v2\/media?parent=612"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaewon.hwang.info\/jaewon\/wp-json\/wp\/v2\/categories?post=612"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaewon.hwang.info\/jaewon\/wp-json\/wp\/v2\/tags?post=612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}