Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Default properties for figures and axes
Date: Wed, 9 Jan 2008 20:46:01 +0000 (UTC)
Organization: TACT Computer Systems Ltd
Lines: 40
Message-ID: <fm3bq9$h0j$1@fred.mathworks.com>
References: <fm380e$obl$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1199911561 17427 172.30.248.38 (9 Jan 2008 20:46:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 9 Jan 2008 20:46:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 642467
Xref: news.mathworks.com comp.soft-sys.matlab:445100



"Petr Krysl" <pkryslNOSP@Mucsd.edu> wrote in message
<fm380e$obl$1@fred.mathworks.com>...
> I've always used programmatic means of setting the
> properties of figures to match my preferences. However, I
> was not happy: I would have liked to change the defaults
> that Matlab used for figures and axes. In other words, set
> the defaults once, and when you say &#8220;figure&#8221; you will get
> the correct colors, fonts (name, slant, size), tick
> directions,  marker size, in other words all the settings
> will be to your satisfaction.
> 
> Here is what I found out would work. It uses undocumented
> properties of the root. I put this into a script that I run
> when I start Matlab working on a project where I need the
> figures to look a certain way:
> 
> set(0, &#8216;DefaultFigureColor&#8217;, &#8216;White&#8217;, &#8230;
<snip>
> What I would like to check is whether it is a bad idea to
> use these undocumented properties, and if so if there is a
> better approach out there. Suggestions or comments, anyone?
> 
> Regards,
> 
> Petr


Actually, this is entirely documented and not at all a bad
idea:
http://www.mathworks.com/access/helpdesk/help/techdoc/creating_plots/f7-21465.html

You can set default property values at the axes, figure and
root levels - all these are documented and fully supported.

p.s. - You can also set the default value at the base class
(schema.prop) level, but this is indeed undocumented.

Yair Altman
http://ymasoftware.com