The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: ploting multiple lines but labeling with one descriptor in legend
Replies: 1   Last Post: Sep 4, 2014 3:10 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Jonathan Allan

Posts: 123
Registered: 12/7/04
ploting multiple lines but labeling with one descriptor in legend
Posted: Sep 4, 2014 2:38 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


What's the best way to plot multiple lines in a figure, but have a single reference in the legend? For example, annual time series spanning 10 years, and have one refernce in the legend (e.g. 2010-2020).

I have the following script...

for test = 1:N-1
z=stdmet(:,parameter); x2=1:length(z);
if parameter==3 || parameter==10 || parameter==11
z = nanmoving_average(z,smth,1,0);
hold on

which loads X years of data and plots, but the end results is X number of references in the legend. I just want one refernce.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.