* [#16003](http://bugzilla.scilab.org/show_bug.cgi?id=16003): Zoom with mouse scroll wheel was broken on simple surfaces.
* [#16005](http://bugzilla.scilab.org/show_bug.cgi?id=16005): The `intdec` example was biased and not robust when changing sampling frequencies.
* [#16007](http://bugzilla.scilab.org/show_bug.cgi?id=16007): Non-integer index in sparse makes Scilab crash.
+* [#16011](http://bugzilla.scilab.org/show_bug.cgi?id=16011): `colorbar(umin, umax)` did not work after `plot3d2`.
* [#16012](http://bugzilla.scilab.org/show_bug.cgi?id=16012): `[struct() struct()]` crashed Scilab.
* [#16013](http://bugzilla.scilab.org/show_bug.cgi?id=16013): Load previously saved environment with "File/Load environment" menu failed.
* [#16014](http://bugzilla.scilab.org/show_bug.cgi?id=16014): after `x.a=1; x(:)=[]` x.a was an empty list.
* [#16272](http://bugzilla.scilab.org/show_bug.cgi?id=16272): `spzeros(0,n)` and `spzeros(n,0)` were different from `sparse(0,0)`.
* [#16275](http://bugzilla.scilab.org/show_bug.cgi?id=16275): `fsolve(x0, fun, tol)` no longer took `tol` into account.
* [#16293](http://bugzilla.scilab.org/show_bug.cgi?id=16293): Some demos run in step-by-step console mode(4) did not focus user's attention to the console to proceed.
+* [#16299](http://bugzilla.scilab.org/show_bug.cgi?id=16299): After `graypolarplot()`, `colorbar()` displayed an empty ungraduated color bar.
// Default umin, umax, colminmax
if Type=="Fec"
u = h.data(:,3);
+
elseif Type=="Plot3d"
u = h.data.z
+
elseif Type=="Fac3d"
u = h.data.z;
- c = h.data.color;
- colorsAreZ = ~isvector(c)
- //if colorsAreZ
- // // c = U*a+b
- // c2 = c-mean(c);
- // u2 = u-mean(u);
- // k = u~=0;
- // colorsAreZ = colorsAreZ & stdev(c(k)./u(k))==0 // Improvement to explore
- //end
+ colorsAreZ = %f;
+ if or(fieldnames(h.data)=="color")
+ c = h.data.color;
+ colorsAreZ = ~isvector(c)
+ if or(h.color_flag==[2 3 4]) & h.cdata_mapping == "direct"
+ u = h.data.color
+ if colminmax == -1
+ colminmax = [min(u) max(u)]
+ end
+ end
+ //if colorsAreZ
+ // // c = U*a+b
+ // c2 = c-mean(c);
+ // u2 = u-mean(u);
+ // k = u~=0;
+ // colorsAreZ = colorsAreZ & stdev(c(k)./u(k))==0 // Improvement to explore
+ //end
+ end
if colorsAreZ
select h.color_flag
case 0
if ~isdef("umin","l") | type(umin)==0 | umin==[] then
if u~=[]
if colminmax~=[] & (length(colminmax)>1 | colminmax~=-1)
- if Type=="Matplot"
+ if Type=="Matplot" | ..
+ Type=="Fac3d" & or(h.color_flag==[2 3 4]) & h.cdata_mapping == "direct"
umin = colminmax(1)
else
if argn(2)<2
if ~isdef("umax","l") | type(umax)==0 | umax==[] then
if u~=[]
if colminmax~=[] & colminmax~=-1
- if Type=="Matplot"
+ if Type=="Matplot" | ..
+ Type=="Fac3d" & or(h.color_flag==[2 3 4]) & h.cdata_mapping == "direct"
umax = colminmax(2)
else
if argn(2)<2
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2019 - 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 16011 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/16011
+//
+// <-- Short Description -->
+// colorbar(umin, umax) failed after plot3d2()
+
+u = linspace(-%pi/2,%pi/2,40);
+v = linspace(0,2*%pi,20);
+X = cos(u)'*cos(v);
+Y = cos(u)'*sin(v);
+Z = sin(u)'*ones(v);
+plot3d2(X,Y,Z)
+assert_checktrue(execstr("colorbar(min(Z), max(Z))", "errcatch")==0);
colorbar(,,[2.97 5]/6); // ticks on [9, 0.2]
// colors in [orange, yellow] must match figure #10 ones
+// 3.4) after graypolarplot()
+clf reset
+graypolarplot
+colorbar
+// Values from 30 to 137. Direct colors = full color map = dark red to white.
+
// 4) Plot3d
// ======
function plotSample()