octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #35761] surf() fails when Z values are within


From: Rik
Subject: [Octave-bug-tracker] [bug #35761] surf() fails when Z values are within eps of each other
Date: Thu, 15 Mar 2012 17:21:54 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2

Follow-up Comment #7, bug #35761 (project octave):

I tried Marco's latest patch, with Jordi's modification.  The code for line
6505 in graphics.cc was


else if (std::abs (min_val - max_val) <= 
         sqrt (std::numeric_limits<double>::epsilon ()) * 
         std::max (std::abs (min_val), std::abs (max_val)))


For the Octave test code I used


[x, y] = meshgrid (-1:1);
z = 0.8 * ones (3);
z(:,1) -= eps/2;
surf (x,y,z)


The figure produced by the old version of Octave is correct.  There are only
two cdata values [0.8-eps/2, 0.8].  Octave scales the cdata to fit the
colormap and with only two values the two colors should be the first color of
the colormap and the last value of the colormap.  These colors are blue and
red for the default jet colormap.

With the patch applied, the resulting plot is all green.  I have attached the
two images.

I still think this may be a specific problem with how we are calling gnuplot,
rather than a general problem that affects both FLTK and gnuplot.


(file #25368, file #25369)
    _______________________________________________________

Additional Item Attachment:

File name: original.png                   Size:61 KB
File name: patched.png                    Size:60 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?35761>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]