help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Customizing legends


From: Torsten
Subject: Re: Customizing legends
Date: Thu, 13 Dec 2012 19:43:46 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 13.12.2012 19:09, JaWiB wrote:
> Hi All,
> 
> New octave user here. I wanted to plot two sets of curves on the same axes,
> where one set of curves is solid lines and one set of curves is dashed
> lines. Since there are about ten curves in each set, I don't want an entry
> for every curve in the legend, just one entry for the solid lines and one
> entry for the dashed lines. For the life of me, I cannot find a way to do
> this using octave. Any thoughts?
> 
> Thanks!
> 
Hi JaWiB,

welcome to octave!
You can use legend labels in the FMT argument of plot(). You only get
entries in the legend if a label is given, e.g.

figure(1);
clf();
hold on;
t = 0:0.1:10;
plot(t,2*sin(t),'r+;Sinus;');     % legend entry
plot(t,3*sin(t),'b+');            % no legend entry
plot(t,2*cos(t),'r-;Cosinus;');
plot(t,3*cos(t),'b-');

Best regards,
Torsten


> 
> 
> --
> View this message in context: 
> http://octave.1599824.n4.nabble.com/Customizing-legends-tp4647846.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]