[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #32275] "surf" function incorrectly handles Na
From: |
Ben Abbott |
Subject: |
[Octave-bug-tracker] [bug #32275] "surf" function incorrectly handles NaN in colour data |
Date: |
Wed, 29 Feb 2012 13:59:21 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 |
Follow-up Comment #4, bug #32275 (project octave):
After some more thought, I'm not sure Matlab is doing the right thing. The
cdata corresponds to the color at the corners of the mesh. When FaceColor =
"flat", the average of the RBG values of the vertices are used to determine
the color of each rectangle in the mesh. If one vertex has a NaN, shouldn't
*four* mesh elements be empty / missing?
When run in Octave and using the gnuplot backend, replacing the NaN with Inf
produces the result I'd expect for NaN.
c = [1 1.5 -1 0.2 2; 2 1.8 1.2 0.4 -0.8;1.6 Inf 0.7 2 -2;-1.1 1.5 0.1 -0.7 0];
[nr, nc] = size(c);
[x, y] = meshgrid (1:nc, 1:nr);
surf(x,y,zeros(size(x)),c)
view (0, 90)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32275>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/