| Author |
Message |
Matt Roos
Guest
|
Posted:
Wed Jan 05, 2005 6:20 am Post subject:
MATLAB legends |
|
|
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 |
|
|
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 |
|
|
Cleve Moler?
Ciao,
Peter K. |
|
| Back to top |
|
 |
|
|
|
|