* [#14399](http://bugzilla.scilab.org/show_bug.cgi?id=14399): Whereami : wrong information (line numbers).
* [#14424](http://bugzilla.scilab.org/show_bug.cgi?id=14424): New problem with the input function.
* [#14532](http://bugzilla.scilab.org/show_bug.cgi?id=14532): `test_run` failed for toolboxes that are not autoloaded.
+* [#14544](http://bugzilla.scilab.org/show_bug.cgi?id=14544): `scatter` and `scatter3` canceled any upstream `drawlater` instruction.
* [#14573](http://bugzilla.scilab.org/show_bug.cgi?id=14573): Management of varargout when is not alone.
* [#14598](http://bugzilla.scilab.org/show_bug.cgi?id=14598): `fort` wasn't properly removed.
* [#14623](http://bugzilla.scilab.org/show_bug.cgi?id=14623): Bad lhs in MList extraction overload.
</para>
<programlisting role="example"><![CDATA[
// x and y initialisation
-x = linspace(0,2,200)
-y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x))
+x = linspace(0,2,200);
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x));
// create 2D scatter plot
-scatter(x,y)
+scatter(x,y);
]]></programlisting>
<scilab:image>
x = linspace(0,2,200)
</para>
<programlisting role="example"><![CDATA[
// x and y initialisation
-x = linspace(0,2,200)
-y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x))
+x = linspace(0,2,200);
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x));
// specify different sizes
-s = linspace(1,30,length(x))
+s = linspace(1,30,length(x));
// create 2D scatter plot
-scatter(x, y, s)
+scatter(x, y, s);
]]></programlisting>
<scilab:image>
x = linspace(0,2,200)
</para>
<programlisting role="example"><![CDATA[
// x and y initialisation
-x = linspace(0, 2, 200)
-y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x))
+x = linspace(0, 2, 200);
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x));
// specify different sizes
-s = linspace(1, 30, length(x))
+s = linspace(1, 30, length(x));
// set color map
gcf().color_map = coolcolormap(64);
// colors according to x values
-c = x
+c = x;
// create 2D scatter plot
-scatter(x,y,s,c)
+scatter(x,y,s,c);
]]></programlisting>
<scilab:image>
x = linspace(0,2,200)
</para>
<programlisting role="example"><![CDATA[
// x and y initialisation
-x = linspace(0, 2, 200)
-y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x))
+x = linspace(0, 2, 200);
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x));
// specify different sizes
-s = linspace(1, 30, length(x))
+s = linspace(1, 30, length(x));
// set color map
gcf().color_map = coolcolormap(64);
// colors according to y values
-c = y
+c = y;
// create 2D scatter plot
-scatter(x, y, s, c, "fill")
+scatter(x, y, s, c, "fill");
]]></programlisting>
<scilab:image>
x = linspace(0,2,200)
</para>
<programlisting role="example"><![CDATA[
// x and y initialisation
-x = rand(1, 200)
-y = rand(1, 200)
+x = rand(1, 200);
+y = rand(1, 200);
// create 2D scatter plot
-scatter(x, y, "d")
+scatter(x, y, "d");
]]></programlisting>
<scilab:image>
x = rand(1,200)
</para>
<programlisting role="example"><![CDATA[
// x and y initialisation
-x = rand(1, 200)
-y = rand(1, 200)
+x = rand(1, 200);
+y = rand(1, 200);
// create 2D scatter plot
scatter(x, y, "markerEdgeColor",[0 .4 .4],...
"markerFaceColor",[0 .8 .8],...
- "linewidth",1.5)
+ "linewidth",1.5);
]]></programlisting>
<scilab:image>
x = rand(1,200)
</para>
<programlisting role="example"><![CDATA[
// x and y initialisation
-x = linspace(0, 2, 100)
-y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x))
+x = linspace(0, 2, 100);
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x));
// create 2D scatter subplot
subplot(2, 1, 1)
-scatter(gca(), x, y)
+scatter(gca(), x, y);
// create 2D scatter subplot
subplot(2, 1, 2)
-scatter(gca(), x, y, "fill", "s")
+scatter(gca(), x, y, "fill", "s");
]]></programlisting>
<scilab:image>
x = linspace(0,2,100)
</para>
<programlisting role="example"><![CDATA[
// x and y initialisation
-t = linspace(0,1,200)
-x = t .* cos(10*%pi*t)
-y = t .* sin(10*%pi*t)
+t = linspace(0,1,200);
+x = t .* cos(10*%pi*t);
+y = t .* sin(10*%pi*t);
// create 2D scatter plot
-p = scatter(x, y)
+p = scatter(x, y);
]]></programlisting>
<scilab:image>
t = linspace(0,25,200)
</scilab:image>
<programlisting role="example"><![CDATA[
// modify polyline
-p.thickness = 0.5
-p.mark_foreground = color("darkblue")
-p.mark_background = color("darkcyan")
+p.thickness = 0.5;
+p.mark_foreground = color("darkblue");
+p.mark_background = color("darkcyan");
]]></programlisting>
<scilab:image>
t = linspace(0,25,200)
</para>
<programlisting role="example"><![CDATA[
// x, y and z initialisation
-t = 1:200
-x = t .* cos(t) .* sin(t)
-y = t .* sin(t) .* sin(t)
-z = t .* cos(t)
+t = 1:200;
+x = t .* cos(t) .* sin(t);
+y = t .* sin(t) .* sin(t);
+z = t .* cos(t);
// create 3D scatter plot
-scatter3(x, y, z)
+scatter3(x, y, z);
// modify rotation angles
gca().rotation_angles = [60, 45];
]]></programlisting>
</para>
<programlisting role="example"><![CDATA[
// x, y and z initialisation
-t = 1:200
-x = t .* cos(t) .* sin(t)
-y = t .* sin(t) .* sin(t)
-z = t .* cos(t)
+t = 1:200;
+x = t .* cos(t) .* sin(t);
+y = t .* sin(t) .* sin(t);
+z = t .* cos(t);
// size according to radius
-s = linspace(50, 1, length(t))
+s = linspace(50, 1, length(t));
// create 3D scatter plot
-scatter3(x, y, z, s)
+scatter3(x, y, z, s);
// modify rotation angles
gca().rotation_angles = [60, 45];
]]></programlisting>
</para>
<programlisting role="example"><![CDATA[
// x, y and z initialisation
-t = 1:200
-x = t .* cos(t) .* sin(t)
-y = t .* sin(t) .* sin(t)
-z = t .* cos(t)
+t = 1:200;
+x = t .* cos(t) .* sin(t);
+y = t .* sin(t) .* sin(t);
+z = t .* cos(t);
// size according to radius
-s = linspace(50, 1, length(t))
+s = linspace(50, 1, length(t));
// set color map
gcf().color_map = coolcolormap(64);
// color according to radius
-c = t
+c = t;
// create 3D scatter plot
-scatter3(x, y, z, s, c)
+scatter3(x, y, z, s, c);
// modify rotation angles
gca().rotation_angles = [60, 45];
]]></programlisting>
</para>
<programlisting role="example"><![CDATA[
// x, y and z initialisation
-z = linspace(0, 25, 200)
-x = z .* cos(z)
-y = z .* sin(z)
+z = linspace(0, 25, 200);
+x = z .* cos(z);
+y = z .* sin(z);
// create 3D scatter plot
-scatter3(x, y, z, "fill")
+scatter3(x, y, z, "fill");
// modify rotation angles
gca().rotation_angles = [60, 45];
]]></programlisting>
</para>
<programlisting role="example"><![CDATA[
// x, y and z initialisation
-z = linspace(0, 25, 200)
-x = z .* cos(z)
-y = z .* sin(z)
+z = linspace(0, 25, 200);
+x = z .* cos(z);
+y = z .* sin(z);
// create 3D scatter plot
-scatter3(x, y, z, "*")
+scatter3(x, y, z, "*");
// modify rotation angles
gca().rotation_angles = [60, 45];
]]></programlisting>
</para>
<programlisting role="example"><![CDATA[
// x, y and z initialisation
-z = linspace(0, 25, 200)
-x = z .* cos(z)
-y = z .* sin(z)
+z = linspace(0, 25, 200);
+x = z .* cos(z);
+y = z .* sin(z);
// create 3D scatter plot
scatter3(x, y, z,...
"markerEdgeColor", "black",...
- "markerFaceColor", [0 .8 .8])
+ "markerFaceColor", [0 .8 .8]);
// modify rotation angles
gca().rotation_angles = [60, 45];
]]></programlisting>
</para>
<programlisting role="example"><![CDATA[
// x, y and z initialisation
-n = 20
-[x, y] = meshgrid(linspace(-2, 2, n))
-z = exp(-x.^2 - y.^2)
+n = 20;
+[x, y] = meshgrid(linspace(-2, 2, n));
+z = exp(-x.^2 - y.^2);
// create 3D scatter subplot
subplot(2,1,1)
-scatter3(gca(), x(:), y(:), z(:))
+scatter3(gca(), x(:), y(:), z(:));
// modify rotation angles
gca().rotation_angles = [60,45];
// create 3D scatter subplot
subplot(2,1,2)
-scatter3(gca(), x(:), y(:), z(:), "markerFaceColor", [0 .8 .8])
+scatter3(gca(), x(:), y(:), z(:), "markerFaceColor", [0 .8 .8]);
// modify rotation angles
gca().rotation_angles = [60,45];
]]></programlisting>
</para>
<programlisting role="example"><![CDATA[
// x, y and z initialisation
-t = 1:200
-x = t .* cos(t) .* sin(t)
-y = t .* sin(t) .* sin(t)
-z = t .* cos(t)
+t = 1:200;
+x = t .* cos(t) .* sin(t);
+y = t .* sin(t) .* sin(t);
+z = t .* cos(t);
// size according to radius
-s = linspace(50, 1, length(t))
+s = linspace(50, 1, length(t));
// create 3D scatter plot
-scatter3(x, y, z, s)
+scatter3(x, y, z, s);
// modify rotation angles
gca().rotation_angles = [60,45];
]]></programlisting>
</scilab:image>
<programlisting role="example"><![CDATA[
// modify polyline
-p.mark_foreground = color(0.5, 0, 0)
-p.mark_background = color(0.5, 0.5, 0)
+p.mark_foreground = color(0.5, 0, 0);
+p.mark_background = color(0.5, 0.5, 0);
]]></programlisting>
<scilab:image>
t = 1:200
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) Scilab Enterprises - 2015 - 2012 - Juergen Koch <juergen.koch@hs-esslingen.de>
-//
+//
// Copyright (C) 2012 - 2016 - Scilab Enterprises
//
// This file is hereby licensed under the terms of the GNU GPL v2.0,
// nothing has to be done
return;
end
-
+
if ( isempty(Z) ) then
if (~isvector(X) | ~isvector(Y) | size(X) ~= size(Y)) then
warning("X and Y must be vectors of the same length.")
return;
end
end
-
+
n = length(X);
[S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVargin(varargin,nextArgin,n);
if (scanFailed) then
return;
end
-
- drawlater();
- if isempty(Z) then
+ f = gcf();
+ old_drawing_mode = f.immediate_drawing;
+ f.immediate_drawing = "off";
+
+ if isempty(Z) then
if isempty(axesHandle) then
plot(X,Y);
else
end
polyLine = gce();
end
-
+
if polyLine.Type <> "Polyline" then
warning("Handle should be a Polyline handle.");
- return;
- end
+ else
+ scatterSetPolyline(polyLine,S,C,thickness,markStyle,markFg,markBg,fill);
- scatterSetPolyline(polyLine,S,C,thickness,markStyle,markFg,markBg,fill);
-
- if ~isempty(Z) then
- set(gca(),"cube_scaling","on");
- set(gca(),"grid",[1 1 1]);
+ if ~isempty(Z) then
+ set(gca(),"cube_scaling","on");
+ set(gca(),"grid",[1 1 1]);
+ end
end
-
- drawnow();
+ f.immediate_drawing = old_drawing_mode;
endfunction
function [S,C,thickness,markStyle,markFg,markBg,fill,scanFailed] = scatterScanVargin(argins,nextArgin,n)
scanFailed = %F;
-
+
// check for size argument
S = [];
if size(argins) >= nextArgin then
C = scatterLinearColorMap(argins(nextArgin));
nextArgin = nextArgin + 1;
elseif n1 == n & n2 == 3 then
- C = addcolor(argins(nextArgin));
+ C = addcolor(argins(nextArgin));
nextArgin = nextArgin + 1;
else
warning("C must be a vector or a matrix of the same length as X.");
if ~isempty(colorRGB) then
C = addcolor(colorRGB/255);
nextArgin = nextArgin + 1;
- end
+ end
elseif (n1 == n & n2 == 1) | (n1 == 1 & n2 == n) then
C = addcolor(name2rgb(argins(nextArgin))/255);
if isempty(C) then
warning(strcat([argins(nextArgin+1) " is not a valid value for property linewidth."]));
scanFailed = %T;
return;
- end
+ end
case "thickness"
if type(argins(nextArgin+1)) == 1 then
thickness = argins(nextArgin+1);
end
elseif type(colorSpec) == 1 & (size(colorSpec) == [1 3] | size(colorSpec) == [3 1]) then
colorInd = addcolor(colorSpec);
- return;
+ return;
end
warning("Specified string is an invalid color value.");
endfunction
end
else
if size(C) == [1 1] then
- polyLine.mark_foreground = C;
+ polyLine.mark_foreground = C;
if fill == %T then
polyLine.mark_background = C;
else
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2017 - Samuel GOUGEON
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- TEST WITH GRAPHIC -->
+// <-- NO CHECK REF -->
+//
+// <-- Non-regression test for bug 14544 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/14544
+//
+// <-- Short Description -->
+// scatter and scatter3 canceled any upstream drawlater instruction
+
+x = linspace(0,2,200);
+y = exp(-x).*cos(10*x) + 0.2*rand(1,length(x));
+clf
+tic();
+// create 2D scatter plot
+for i=1:12, subplot(3,4,i), scatter(x,y); end
+t1 = toc();
+clf
+tic();
+drawlater
+for i=1:12, subplot(3,4,i), scatter(x,y); end
+drawnow
+t2 = toc();
+assert_checktrue(t1>t2);