// Caution there are a number of tricks...
x = linspace(0,4*%pi,80);
z = cos(x')*cos(x);
-
clf(); f=gcf();
xset("fpf"," ")
-
// trick 1: this implies that the level numbers are not
// drawn on the level curves
f.color_map=jetcolormap(7);
-
// trick 2: to be able to put the legend on the right without
// interfering with the level curves use rect with a xmax
// value large enough
contour2d(x,x,z,-0.75:0.25:0.75,frameflag=3,rect=[0,0,5*%pi,4*%pi])
-
// trick 3: use legends (note that the more practical legend function
// will not work as soon as one of the level is formed by 2 curves)
legends(string(-0.75:0.25:0.75),1:7,"lr");
</note>
</para>
<programlisting role="no-scilab-exec"><![CDATA[
-[im,jm] = find(z == zmin); // or zmax
+[im,jm] = find(z == zmin); // или zmax
plot2d(x(im)',y(jm)',-9,"000")
]]></programlisting>
</listitem>
z = cos(x')*cos(x);
clf(); f=gcf();
xset("fpf"," ")
+
// уловка 1: подразумевается, что номера уровней
// не рисуются на кривых уровней
f.color_map=jetcolormap(7);
+
// уловка 2: чтобы иметь возможность поместить легенду справа без
// наложения на кривые уровней, используйте rect с достаточно
// большим значением xmax
contour2d(x,x,z,-0.75:0.25:0.75,frameflag=3,rect=[0,0,5*%pi,4*%pi])
+
// уловка 3: используйте legends (заметьте, что наиболее практичная функция
// легенды не будет работать, когда один из уровней формируется
// двумя кривыми)