Man Scilab

plot2d_old_version
Scilab Function

plot2d_old_version - 2D plot reference

Calling Sequence

plot2d([x],y)
plot2d([x],y,<opt_args>) (new syntax)
plot2d([logflag],x,y,[style,strf,leg,rect,nax]) (old syntax)

Parameters

Description

plot2d plots a set of 2D curves. Piecewise linear plotting is used.

By default, successive plots are superposed. To clear the previous plot, use xbasc() .

See the meaning of the parameters above for a complete description.

Enter the command plot2d() to see a demo.

Other high level plot2d function exist:

plot2d2 : same as plot2d but the curve is supposed to be piecewise constant.
plot2d3 : same as plot2d but the curve is plotted with vertical bars.
plot2d4 : same as plot2d but the curve is plotted with arrows.

Examples


//simple plot 
x=[0:0.1:2*%pi]';
plot2d(sin(x))
xbasc()
plot2d(x,sin(x))
//multiple plot
xbasc()
plot2d(x,[sin(x) sin(2*x) sin(3*x)])
// multiple plot giving the dimensions of the frame 
// old syntax and new syntax
xbasc()
plot2d(x,[sin(x) sin(2*x) sin(3*x)],1:3,"011","",[0,0,6,0.5])
xbasc()
plot2d(x,[sin(x) sin(2*x) sin(3*x)],rect=[0,0,6,0.5])
//multiple plot with captions and given tics // old syntax and new syntax
xbasc()
plot2d(x,[sin(x) sin(2*x) sin(3*x)],..
  [1,2,3],"111","L1@L2@L3",[0,-2,2*%pi,2],[2,10,2,10]) xbasc()
plot2d(x,[sin(x) sin(2*x) sin(3*x)],..
  [1,2,3],leg="L1@L2@L3",nax=[2,10,2,10],rect=[0,-2,2*%pi,2])
// isoview
xbasc()
plot2d(x,sin(x),1,"041")
// scale
xbasc()
plot2d(x,sin(x),1,"061")
// auto scaling with previous plots
xbasc()
plot2d(x,sin(x),1)
plot2d(x,2*sin(x),2) plot2d(2*x,cos(x),3)
// axis on the right xbasc()
plot2d(x,sin(x),1,"183","sin(x)")
// centered axis xbasc()
plot2d(x,sin(x),1,"184","sin(x)")
// axis centered at (0,0)
xbasc()
plot2d(x-4,sin(x),1,"185","sin(x)")
 

See Also

plot2d1 ,   plot2d2 ,   plot2d3 ,   plot2d4 ,   xbasc ,   xset ,  

Author

J.Ph.C.

Back