## 5.4.3 Specialized 2D Plottings

• champ : vector field in

//try champ
x=[-1:0.1:1];y=x;u=ones(x);
fx=x.*.u';fy=u.*.y';
champ(x,y,fx,fy);
xset("font",2,3);
xtitle(['Vector field plot';'(with champ command)']);
//with the color (and a large stacksize)
x=[-1:0.004:1];y=x;u=ones(x);
fx=x.*.u';fy=u.*.y';
champ1(x,y,fx,fy);


• fchamp : for a vector field in defined by a function. The same plot than champ for a vector field defined for example by a scilab program.

• fplot2d : 2D plotting of a curve described by a function. This function plays the same role for plot2d than the previous for champ.

• grayplot : 2D plot of a surface using gray levels; the surface being defined by the matrix of the values for a grid.

• fgrayplot : the same than the previous for a surface defined by a function (scilab program).

In fact these 2 functions can be replaced by a usual color plot with an appropriate colormap where the 3 RGB components are the same.

R=[1:256]/256;RGB=[R' R' R'];
xset('colormap',RGB);
deff('[z]=surf(x,y)','z=-((abs(x)-1)**2+(abs(y)-1)**2)');
fgrayplot(-1.8:0.02:1.8,-1.8:0.02:1.8,surf,rect=[-2,-2,2,2]);
xset('font',2,3);
xtitle(["Grayplot";"(with fgrayplot command)"]);
//the same plot can be done with a unique'' given color
R=[1:256]/256;
G=0.1*ones(R);
RGB=[R' G' G'];
xset('colormap',RGB);
fgrayplot(-1.8:0.02:1.8,-1.8:0.02:1.8,surf,rect=[-2,-2,2,2]);


• errbar : creates a plot with error bars