MATLAB legends
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
MATLAB legends

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP
Author Message
Matt Roos
Guest





Posted: Wed Jan 05, 2005 6:20 am    Post subject: MATLAB legends Reply with quote

Hi, All. I'm trying to make a plot in MATLAB that has both a traditional
plot and a stem plot. I'm having problems generating the legend, however.
Here's what I'm doing.

hold off;
figure(1); plot(x,y,'r-');
hold on;
figure(1); stem(x,y,'b');
legend('line plot','stem plot');
hold off;

The problem is that the legend doesn't have the correct markings (color
actually). I think this may be a problem with version 7.0 but not prior
versions. Any MATLAB 7.0 people out there have the same problem? Any
work-arounds would be appreciated (e.g., what properties of the legend
control the marking style and color?).

Thanks,
Matt

--
Remove Xs from address to reply via e-mail.
Back to top
Ken Prager
Guest





Posted: Wed Jan 05, 2005 7:20 pm    Post subject: Re: MATLAB legends Reply with quote

In article <QrOdnchfdPN83UbcRVn-qw@comcast.com>,
"Matt Roos" <XXmatt.roos@verizon.net> wrote:

Quote:
Hi, All. I'm trying to make a plot in MATLAB that has both a traditional
plot and a stem plot. I'm having problems generating the legend, however.
Here's what I'm doing.

hold off;
figure(1); plot(x,y,'r-');
hold on;
figure(1); stem(x,y,'b');
legend('line plot','stem plot');
hold off;

The problem is that the legend doesn't have the correct markings (color
actually). I think this may be a problem with version 7.0 but not prior
versions. Any MATLAB 7.0 people out there have the same problem? Any
work-arounds would be appreciated (e.g., what properties of the legend
control the marking style and color?).


Using...

x=1:100;
y=randn(1,100);

....the plot and legend looks fine to me. That is, the line plot is red
and the stem plot is blue; the legend matches that.

I am using 7.0 on a Mac running OS X 10.3.

BTW, you can control all aspects of the plots through Handle Graphics.
See...

<http://www.mathworks.com/access/helpdesk/help/techdoc/creating_plots/cre
ating_plots.html>

Ken P.

--
Remove _me_ for e-mail address
Back to top
Peter K.
Guest





Posted: Wed Jan 05, 2005 7:23 pm    Post subject: Re: MATLAB legends Reply with quote

Cleve Moler?

Ciao,

Peter K.
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB