Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: How to add legend to an area plot with line plot overlay
Date: Sun, 16 May 2010 00:30:25 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 1
Message-ID: <hsneb1$7s0$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1273969825 8064 172.30.248.38 (16 May 2010 00:30:25 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 16 May 2010 00:30:25 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2354641
Xref: news.mathworks.com comp.soft-sys.matlab:636178

Hi, I am trying to create a plot with an area plot and a line plot (on the second axis). My question is how do you add a legend for both plots. Essentially, I want it to look similar to Excel when you just put the second data series on a secondary axis and show the legends together. Ideally I'd like to put the legend in one box, outside of the two plots. Any help would be greatly appreciated!