plot2d(x, x, axesflag=4);
axes = gca();
if (axes.axes_visible <> ["on","on","on"]) then bugmes();quit;end
-if (axes.x_location <> "origin") then bugmes();quit;end
-if (axes.y_location <> "origin") then bugmes();quit;end
+if (axes.x_location <> "middle") then bugmes();quit;end
+if (axes.y_location <> "middle") then bugmes();quit;end
// axesflag=5: axes + box + x centered + y centered
clf();
plot2d(x, x, axesflag=5);
axes = gca();
if (axes.axes_visible <> ["on","on","on"]) then bugmes();quit;end
if (axes.box <> "on") then bugmes();quit;end;
-if (axes.x_location <> "origin") then bugmes();quit;end
-if (axes.y_location <> "origin") then bugmes();quit;end
+if (axes.x_location <> "middle") then bugmes();quit;end
+if (axes.y_location <> "middle") then bugmes();quit;end
// axesflag=9: axes + !box + y left
clf();
plot2d(x, x, axesflag=9);
plot2d(x, x, axesflag=4);
axes = gca();
if (axes.axes_visible <> ["on","on","on"]) then pause; end
-if (axes.x_location <> "origin") then pause; end
-if (axes.y_location <> "origin") then pause; end
+if (axes.x_location <> "middle") then pause; end
+if (axes.y_location <> "middle") then pause; end
// axesflag=5: axes + box + x centered + y centered
clf();
axes = gca();
if (axes.axes_visible <> ["on","on","on"]) then pause; end
if (axes.box <> "on") then pause; end;
-if (axes.x_location <> "origin") then pause; end
-if (axes.y_location <> "origin") then pause; end
+if (axes.x_location <> "middle") then pause; end
+if (axes.y_location <> "middle") then pause; end
// axesflag=9: axes + !box + y left
clf();
delete(gcf());
subplot(211);
plot3d();
+e = gce();
+subplot(212);
+a = gca();
+// Save axes properties that should not be modified.
+axes_visible = a.axes_visible;
+box = a.box;
+margins = a.margins;
+x_label_visible = a.x_label.visible;
+y_label_visible = a.y_label.visible;
+z_label_visible = a.z_label.visible;
+// Now copy handle.
+copy(e);
+a = gca();
+// Check that axes properties did not change.
+if( or(a.axes_visible ~= axes_visible) ) then bugmes();quit;end
+if( a.box ~= box ) then bugmes();quit;end
+if( or(a.margins ~= margins) ) then bugmes();quit;end
+if( x_label_visible ~= a.x_label.visible ) then bugmes();quit;end
+if( y_label_visible ~= a.y_label.visible ) then bugmes();quit;end
+if( z_label_visible ~= a.z_label.visible ) then bugmes();quit;end
f = gcf();
delete(f);
if execstr("save(TMPDIR+""/bug_2165.tst"");", "errcatch")<>0 then bugmes();quit;end
-WARNING : save_graphichandle: handle no more valid ignored.
+ATTENTION : save_graphichandle : handle plus valide ignoré.
stacksize(1e8)
p=1:9000000;
q=9000000:-1:1;
-plot2d(p,q)
-PolylineLineDrawerJoGL::drawPolyline: No more memory.
+plot2d(p,q)
// scilab should display an error message, but not crash.
// http://bugzilla.scilab.org/show_bug.cgi?id=2796
//
// <-- Short Description -->
-// There is a variable named k equals to à 1 when a function f is evaluated when
// plotting with plot(x,f).
k = 42;
function r=f(x),
//
// <-- Short Description -->
// we lost axes with plot3d and box = 2
-t=[0:0.1:2*%pi]'; z=sin(t)*cos(t');
+t=[0:0.1:2*%pi]'; z=sin(t)*cos(t');
f=gcf();f.color_map=hsvcolormap(64);
plot3d1(t,t,z,35,45,"X@Y@Z",[-2,2,2])
-// with box = 2 we should have only the back thriedron drawn
+// with box = 2 we should have only the back thriedron drawn
// and no labels
axes = gca();
-if (axes.box <> "hidden_axis") then bugmes();quit;end
+if (axes.box <> "hidden_axes") then bugmes();quit;end
if (axes.x_label.visible <> "off") then bugmes();quit;end
if (axes.y_label.visible <> "off") then bugmes();quit;end
if (axes.z_label.visible <> "off") then bugmes();quit;end
// with box = 2 we should have only the back thriedron drawn
// and no labels
axes = gca();
-if (axes.box <> "hidden_axis") then pause; end
+if (axes.box <> "hidden_axes") then pause; end
if (axes.x_label.visible <> "off") then pause; end
if (axes.y_label.visible <> "off") then pause; end
if (axes.z_label.visible <> "off") then pause; end
if or(c.links<>l([1 3])) then bugmes();quit;end
if or(c.text<>["1";"3"]) then bugmes();quit;end
delete(e.children(2));
-if or(c.links<>l([3])) then bugmes();quit;end
-if or(c.text<>["3"]) then bugmes();quit;end
+if or(c.links<>l([1])) then bugmes();quit;end
+if or(c.text<>["1"]) then bugmes();quit;end
if or(c.text<>["1";"3"]) then pause,end
delete(e.children(2));
-if or(c.links<>l([3])) then pause,end
-if or(c.text<>["3"]) then pause,end
+if or(c.links<>l([1])) then pause,end
+if or(c.text<>["1"]) then pause,end
//
// <-- Short Description -->
// xbasc() doesn't clear the current graphics window.
-//
+//
x = 1:10;
plot(x);
xbasc();
+AVERTISSEMENT : La fonction xbasc est obsolète.
+AVERTISSEMENT : Utilisez plutôt clf s'il vous plait.
+AVERTISSEMENT : Cette fonction va être définitivement enlevée de Scilab 5.3
+
// check that there only an axes below the current figure
fig = gcf();
// only axes
plot3d(x,x,cos(x)'*sin(x));
// erase all figure with index from 0 to 3
xbasc(0:3);
+AVERTISSEMENT : La fonction xbasc est obsolète.
+AVERTISSEMENT : Utilisez plutôt clf s'il vous plait.
+AVERTISSEMENT : Cette fonction va être définitivement enlevée de Scilab 5.3
+
// we should have only empty figures
for i=0:3,
fig = get_figure_handle(i);
// http://bugzilla.scilab.org/show_bug.cgi?id=4082
//
// <-- Short Description -->
-//
+//
// After save ( xsave ) a figure, the load command ( save/xsave ) modify the name of the figure.
t=0:0.01:10;
subplot(211),plot2d(t,sin(t))
clf()
load(TMPDIR+'/foo.scg') //or xload
f = gcf();
-if f.figure_name <> "Figure %d" then bugmes();quit;end
+if f.figure_name <> "Figure n°%d" then bugmes();quit;end
f = gcf();
-if f.figure_name <> "Figure %d" then pause,end
\ No newline at end of file
+if f.figure_name <> "Figure n°%d" then pause,end
tics_style = "v"
sub_tics = 2
tics_labels = ["2cm","3cm","4cm","5cm","6cm","7cm"]
+format_n = "%0.0fcm"
labels_font_size = 0
labels_font_color = -1
fractional_font = "off"
f.auto_resize = "off";
plot(1:10);
f.axes_size = [10000, 10000];
-Wrong value for property 'axes_size': smaller values expected.
// it should instead provide an error message
// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2008 - INRIA - Serge Steer
+// Copyright (C) 2008 - INRIA - Serge Steer
//
// This file is distributed under the same license as the Scilab package.
// =============================================================================
e1.foreground=5;e1.thickness=3;
xpoly([0 1],0.2+[1 1]/2);
e2=gce();e2.mark_mode='on';e2.line_mode='off';e2.mark_style=3;
-c=captions([e1,e2],['XXXX';'YYY']);
+c=captions([e2,e1],['XXXX';'YYY']);
if or(c.text <> ["XXXX";"YYY"]) then bugmes();quit;end
if or(c.links <> [e2,e1]) then bugmes();quit;end
c=captions([],[]);
for y= 0:0.1:1
xpoly([0 1],[1 1]*y);
e=gce();e.foreground=10*y;
- E=[E e];
+ E=[e E];
end
c=captions(E,string( 0:0.1:1));
xpause(2d6)
xpause(2d6)
end
c.legend_location='by_coordinates';c.position=[0.5 1/8];
-xpause(2d6)
+xpause(2d6)
// captions with paches
clf();a=gca();
a.data_bounds=[-1 -1;2 2];a.axes_visible='on';
xpoly(cos(x),sin(x))
E=gce();
xpoly(1+0.3*cos(x),1+0.3*sin(x))
-E=[E, gce()];
+E=[gce(), E];
xpoly(1.5+0.1*cos(x),1.5+0.1*sin(x))
-E=[E, gce()];
+E=[gce(), E];
for k=1:3
- E(k).foreground=k;
- E(k).background=k+1;
- E(k).fill_mode='on';
- E(k).closed='on';
+ E(4-k).foreground=k;
+ E(4-k).background=k+1;
+ E(4-k).fill_mode='on';
+ E(4-k).closed='on';
end
-E(1).thickness=3;
+E(3).thickness=3;
c=captions(E,['A' 'B' 'C']);
c.legend_location='in_upper_right';
e1.foreground=5;e1.thickness=3;
xpoly([0 1],0.2+[1 1]/2);
e2=gce();e2.mark_mode='on';e2.line_mode='off';e2.mark_style=3;
-c=captions([e1,e2],['XXXX';'YYY']);
+c=captions([e2,e1],['XXXX';'YYY']);
if or(c.text <> ["XXXX";"YYY"]) then pause,end
for y= 0:0.1:1
xpoly([0 1],[1 1]*y);
e=gce();e.foreground=10*y;
- E=[E e];
+ E=[e E];
end
c=captions(E,string( 0:0.1:1));
xpause(2d6)
xpoly(cos(x),sin(x))
E=gce();
xpoly(1+0.3*cos(x),1+0.3*sin(x))
-E=[E, gce()];
+E=[gce(), E];
xpoly(1.5+0.1*cos(x),1.5+0.1*sin(x))
-E=[E, gce()];
+E=[gce(), E];
for k=1:3
- E(k).foreground=k;
- E(k).background=k+1;
- E(k).fill_mode='on';
- E(k).closed='on';
+ E(4-k).foreground=k;
+ E(4-k).background=k+1;
+ E(4-k).fill_mode='on';
+ E(4-k).closed='on';
end
-E(1).thickness=3;
+E(3).thickness=3;
c=captions(E,['A' 'B' 'C']);
c.legend_location='in_upper_right';