Man Scilab

legends
Scilab Function

legends - draw graph legend

Calling Sequence

legends(strings,style [,opt, with_box])

Parameters

Description

Puts a legend on the current plot using the specified strings as labels.

In the interactive placement (opt=5 or opt="?") move the legend box with the mouse and press the left button to release it.

This function allows more flexible placement of the legends than the leg plot2d argument.

Examples


t=0:0.1:2*%pi;
plot2d(t,[cos(t'),cos(2*t'),cos(3*t')],[-1,2 3]);  
legends(['cos(t)';'cos(2*t)';'cos(3*t)'],[-1,2 3],opt="lr")
xset("line style",2);plot2d(t,cos(t),style=5);
xset("line style",4);plot2d(t,sin(t),style=3);
legends(["sin(t)";"cos(t)"],[[5;2],[3;4]], with_box=%f, opt="?")
 
  

See Also

plot2d ,   xstring ,   xtitle ,  

Back