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

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

[Octave-bug-tracker] [bug #42766] incorrect color patches for countourf


From: John Hunt
Subject: [Octave-bug-tracker] [bug #42766] incorrect color patches for countourf with NaNs in data
Date: Sat, 01 Nov 2014 20:45:20 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0

Follow-up Comment #3, bug #42766 (project octave):

Thanks for the '-Inf' workaround. 
It has proven useful in another case
<http://stackoverflow.com/a/26692915/3565696>

Sometimes '+inf' is better.

Here is a case where neither '-inf' or '+inf' work.
(in bothsides-inf.png; the upper stripe should be in dark red)

[x, y] = ndgrid(0:10:100, 0:10:100);
data = x + y;
data(data > 150) = NaN;
data(data < 50) = NaN;
data(isnan(data)) = -inf;
c = contourf(x, y, data);


using +inf is worse (resulting in bothsides+inf.png).

(file #32352, file #32353)
    _______________________________________________________

Additional Item Attachment:

File name: bothsides-inf.png              Size:102 KB
File name: bothsides+inf.png              Size:89 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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