Description of problem: Version-Release number of selected component (if applicable): GNU Octave, version 2.1.36 (Solved in later versions of Octave) How reproducible: 100% Steps to Reproduce: octave:1> x = y = [0:0.01:2]; octave:2> z = sin(x' * y); octave:3> contour(x,y,z,[1:1:15]) Actual results: Only 10 contour lines appear Expected results: 15 contour lines appear Additional info: When I try to make a contour plot I cannot make more than 10 levels. I have been looking in the code and I think that the problem occurs because of a maximum string length. In order to prove this, I copied contour.m to my home directory and removed two semicolons. Afterwards line 88 - 96 looked like this: if (is_scalar (n)) command = sprintf ("gset cntrparam levels %d", n); elseif (is_vector (n)) tmp = sprintf ("%f", n(1)); for i = 2:length (n) tmp = sprintf ("%s, %f", tmp, n(i)) # colon is removed endfor command = sprintf ("gset cntrparam levels discrete %s", tmp) # same here endif I tried the following octave:1> x = y = [0:0.01:2]; octave:2> z = sin(x' * y); octave:3> contour(x,y,z,[1:1:15]) The resulting plot contained only levels 1:10. Here is the output. Note that for i>10, I got tmp = 1:10,N. tmp = 1.000000, 2.000000 tmp = 1.000000, 2.000000, 3.000000 tmp = 1.000000, 2.000000, 3.000000, 4.000000 tmp = 1.000000, 2.000000, 3.000000, 4.000000, 5.000000 tmp = 1.000000, 2.000000, 3.000000, 4.000000, 5.000000, 6.000000 tmp = 1.000000, 2.000000, 3.000000, 4.000000, 5.000000, 6.000000, 7.000000 tmp = 1.000000, 2.000000, 3.000000, 4.000000, 5.000000, 6.000000, 7.000000, 8.000000 tmp = 1.000000, 2.000000, 3.000000, 4.000000, 5.000000, 6.000000, 7.000000, 8.000000, 9.000000 tmp = 1.000000, 2.000000, 3.000000, 4.000000, 5.000000, 6.000000, 7.000000, 8.000000, 9.000000, 10.000000 tmp = 1.000000, 2.000000, 3.000000, 4.000000, 5.000000, 6.000000, 7.000000, 8.000000, 9.000000, 10.000000, 11.000000 tmp = 1.000000, 2.000000, 3.000000, 4.000000, 5.000000, 6.000000, 7.000000, 8.000000, 9.000000, 10.000000, 12.000000 tmp = 1.000000, 2.000000, 3.000000, 4.000000, 5.000000, 6.000000, 7.000000, 8.000000, 9.000000, 10.000000, 13.000000 tmp = 1.000000, 2.000000, 3.000000, 4.000000, 5.000000, 6.000000, 7.000000, 8.000000, 9.000000, 10.000000, 14.000000 tmp = 1.000000, 2.000000, 3.000000, 4.000000, 5.000000, 6.000000, 7.000000, 8.000000, 9.000000, 10.000000, 15.000000 command = gset cntrparam levels discrete 1.000000, 2.000000, 3.000000, 4.000000, 5.000000, 6.000000, 7.000000, 8.000000, 9.000000, 10.000000
*** This bug has been marked as a duplicate of 89705 ***