This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 89704 - Choice of levels in contour plot is impossible
Choice of levels in contour plot is impossible
Status: CLOSED DUPLICATE of bug 89705
Product: Red Hat Linux
Classification: Retired
Component: octave (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Lon Hohberger
http://www.octave.org/mailing-lists/h...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-26 06:54 EDT by Niels L Ellegaard
Modified: 2007-04-18 12:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-04-28 12:49:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Niels L Ellegaard 2003-04-26 06:54:35 EDT
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
Comment 1 Lon Hohberger 2003-04-28 11:27:35 EDT

*** This bug has been marked as a duplicate of 89705 ***

Note You need to log in before you can comment on or make changes to this bug.