next up previous contents index
Next: 5.4.6 Some Classical Graphics Up: 5.4 2D Plotting Previous: 5.4.4.2 Curves Plotting

5.4.5 Writting by Plotting

We give now the sequence of the commands for obtaining the figure  5.8.

//	initialize default environment variables
xset('default');
xset("use color",0);
plot([1:10]);
xbasc()
xrect(0,1,3,1)
xfrect(3.1,1,3,1)
xstring(0.5,0.5,"xrect(0,1,3,1)")
xstring(4.,0.5,"xfrect(3.1,1,3,1)")
xset("alufunction",6)
xstring(4.,0.5,"xfrect(3.1,1,3,1)")
xset("alufunction",3)
xv=[0 1 2 3 4]
yv=[2.5 1.5 1.8 1.3 2.5]
xpoly(xv,yv,"lines",1)
xstring(0.5,2.,"xpoly(xv,yv,""lines"",1)")
xa=[5 6 6 7 7 8 8 9 9 5]
ya=[2.5 1.5 1.5 1.8 1.8 1.3 1.3 2.5 2.5 2.5]
xarrows(xa,ya)
xstring(5.5,2.,"xarrows(xa,ya)")
xarc(0.,5.,4.,2.,0.,64*300.)
xstring(0.5,4,"xarc(0.,5.,4.,2.,0.,64*300.)")
xfarc(5.,5.,4.,2.,0.,64*360.)
//xset("alufunction",6)
xclea(5.6,4.4,2.8,0.8);
xstring(5.8,4.,"xfarc  and then  xclea")
//xset("alufunction",3)
xstring(0.,4.5,"WRITING-BY-XSTRING()",-22.5) 
xnumb([5.5 6.2 6.9],[5.5 5.5 5.5],[3 14 15],1)
isoview(0,12,0,12)
xarc(-5.,12.,5.,5.,0.,64*360.)
xstring(-4.5,9.25,"isoview + xarc",0.)
xset("font",4,5)
A=["  1" "       2" "  3";"  4" "       5" "  6";"68" "  17.2" "  9"];
xstring(7.,10.,A);
rect=xstringl(7,10,A);
xrect(rect(1),rect(2),rect(3),rect(4));

Figdirfigures/

  
Figure 5.8: Geometric Graphics and Comments
\begin{figure}
\begin{center}
\fbox{\begin{picture}
(300.0,212.0)
\special{ps...
...nouv7.epsf hscale=100.0 vscale=100.0}
\end{picture}} \end{center}
\end{figure}

e have seen that some parameters of the graphics are controlled by a graphic context ( for example the line thickness) and others are controlled through graphics arguments .


next up previous contents index
Next: 5.4.6 Some Classical Graphics Up: 5.4 2D Plotting Previous: 5.4.4.2 Curves Plotting
Scilab Group