|
From: | Rik |
Subject: | [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot |
Date: | Tue, 20 Sep 2016 04:51:12 +0000 (UTC) |
User-agent: | Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Follow-up Comment #6, bug #49130 (project octave): According to Matlab's documentation at http://www.mathworks.com/help/matlab/ref/caxis.html. index = fix((C-cmin)/(cmax-cmin)*m)+1; %Clamp values outside the range [1 m] index(index<1) = 1; index(index>m) = m; So it would appear that they use N rather than N-1. It seems like the last bit, clamping, is an additional requirement for the mapcdata function. Otherwise, you can easily get negative values when cmin is greater than C. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?49130> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |