{"id":1489,"date":"2005-11-15T15:10:17","date_gmt":"2005-11-15T20:10:17","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=1489"},"modified":"2006-02-09T13:27:15","modified_gmt":"2006-02-09T18:27:15","slug":"default-docked-figures","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2005\/11\/15\/default-docked-figures\/","title":{"rendered":"Default Docked Figures"},"content":{"rendered":"<p>I just wanted to pass along a small tip that you might find useful.  If you&#8217;ve become as big of a fan of docked figures as I have, you might be looking for a way to have figures docked by default when they are created.  This is easy to do (but not obvious) by modifying default figure properties.  The following command will cause all subsequent new figures in the current MATLAB session to open docked:<\/p>\n<pre class=\"code\">set(0,'DefaultFigureWindowStyle','docked')<\/pre>\n<p>Put this command in your <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/startup.html\">startup.m<\/a> file for this to be the default behavior for every MATLAB session.<\/p>\n<p><b>Don&#8217;t like it? <\/b><br \/>\nThis will set things back to normal.<\/p>\n<pre>set(0,'DefaultFigureWindowStyle','normal')<\/pre>\n<p><b>Want to understand how this command works?<\/b><br \/>\nThis is the standard graphics <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/set.html\">set <\/a> command.  The first argument is the handle to the root graphics object, i.e. the screen.  This applies to all subequently generated graphics objects.  When a figure is docked, it&#8217;s WindowStyle property is set to &#8216;docked&#8217;.  Since this is a Figure property, I can modify it&#8217;s default behavior by appending DefaultFigure to WindowStyle.  Hence, <\/p>\n<pre class=\"code\">set(0,'DefaultFigureWindowStyle','docked')<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I just wanted to pass along a small tip that you might find useful.  If you&#8217;ve become as big of a fan of docked figures as I have, you might be looking for a way to have figures docked by&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2005\/11\/15\/default-docked-figures\/\">read more >><\/a><\/p>\n","protected":false},"author":33,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/1489"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=1489"}],"version-history":[{"count":0,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/1489\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=1489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=1489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=1489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}