|
From: | Guillaume |
Subject: | [Octave-bug-tracker] [bug #58325] NaN color with imagesc |
Date: | Thu, 7 May 2020 12:47:42 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 |
URL: <https://savannah.gnu.org/bugs/?58325> Summary: NaN color with imagesc Project: GNU Octave Submitted by: gyom Submitted on: Thu 07 May 2020 04:47:41 PM UTC Category: Plotting with OpenGL Severity: 3 - Normal Priority: 5 - Normal Item Group: Matlab Compatibility Status: None Assigned to: None Originator Name: Guillaume Originator Email: Open/Closed: Open Release: dev Discussion Lock: Any Operating System: Any _______________________________________________________ Details: When displaying an image containing NaNs with imagesc, Octave displays them as black while Matlab uses the first color of the colormap. I could find a related comment on the Octave Help mailing list: https://lists.gnu.org/archive/html/help-octave/2018-10/msg00059.html and it seems to be frequently mentioned by Matlab users: https://stackoverflow.com/questions/14933039/matlab-imagesc-plotting-nan-values https://stackoverflow.com/questions/8481324/contrasting-color-for-nans-in-imagesc https://www.mathworks.com/matlabcentral/answers/373508-imagesc-how-to-set-nan-as-white-color https://www.mathworks.com/matlabcentral/answers/81938-set-nan-as-another-color-than-default-using-imagesc Now, the Matlab documentation says: "The behavior of NaN elements is not defined." https://www.mathworks.com/help/matlab/ref/imagesc.html#buxkjup-2l so there is no need to try and reproduce an undefined behavior. But could the documentation be updated to either say that the behavior is unpredictable or that a black color will be used? _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?58325> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |