Path: news.mathworks.com!not-for-mail
From: "Paul Mennen" <nospam@mennen.org>
Newsgroups: comp.soft-sys.matlab
Subject: Re: R2009a: Setting GridLines Color Different to Axis Color...
Date: Sat, 4 Jul 2009 01:34:02 +0000 (UTC)
Organization: Sigknowledge
Lines: 10
Message-ID: <h2mbia$9hi$1@fred.mathworks.com>
References: <h1tnhe$ljl$1@fred.mathworks.com> <98cffd5e-6e2b-4353-9e1d-dfebbcd368d3@q3g2000pra.googlegroups.com>
Reply-To: "Paul Mennen" <nospam@mennen.org>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1246671242 9778 172.30.248.37 (4 Jul 2009 01:34:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 4 Jul 2009 01:34:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869812
Xref: news.mathworks.com comp.soft-sys.matlab:552739


Nathan wrote 
> Try this.
> c_axes = copyobj(gca,gcf);
> set(c_axes, ...

Looks pretty cryptic to me. One shouldn't have to resort to such cryptic commands for such commonplace tasks. Assuming you are creating 2D plots, an alternative to consider is the "plt" function from the file exchange. (My creation, I'm proud to admit.) For one thing, the default grid color is much more subtle and reasonable so you may never be possessed to change it. But if you do want to change it, simply use the 'GRIDc' argument as spelled out in the help file. And of course I wouldn't have done anything as silly as linking the grid color in any way to the x or y axis ticks or labels. Also plt works the same in any version of Matlab released within the last 8 years.

If you try plt, I think you will find that one of its strongest advantages over the native "plot" is the well organized help file which clearly explains all the plotting features (with examples!). With plt you won't have to become a handle graphics expert to deal with the poorly documented and cryptic auxiliary functions such as plotyy, plotyyy, etc.

~Paul