Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: multiple background-color
Date: Mon, 18 Aug 2008 11:45:08 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <g8bnc3$ioa$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1219059908 19210 172.30.248.35 (18 Aug 2008 11:45:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 18 Aug 2008 11:45:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1451005
Xref: news.mathworks.com comp.soft-sys.matlab:486003



Hi.

Is there a way to set the background color of a plot to
multiple colors?

For example:

x = (-10:10)
y = ones(size(x));

plot(x,y)

In this case I want the background to be green for x-axis
-10 to 0 and red for x-axis 0 to 10.


Thx and regards.
Walter