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$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1273969825 8064 (16 May 2010 00:30:25 GMT)
NNTP-Posting-Date: Sun, 16 May 2010 00:30:25 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2354641
Xref: 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!