bugGNU Octave - Bugs: bug #58325, Document how NaN color value is...


bug #58325: Document how NaN color value is handled by imagesc

Submitted by:  Guillaume <gyom>
Submitted on:  Thu 07 May 2020 04:47:41 PM UTC  
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Confirmed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 12 May 2020 10:14:03 PM UTC, comment #1: 

I think it would be fine to add documentation that Octave uses black for NaN values in imagesc.  Also, you might want to document the workaround of using pcolor.

pcolor (x)
shading interp
set (gca, 'color', DESIRED_COLOR_FOR_NAN_VALUES)

Rik <rik5>
Project Administrator
Thu 07 May 2020 04:47:41 PM UTC, original submission:  

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:
and it seems to be frequently mentioned by Matlab users:

Now, the Matlab documentation says: "The behavior of NaN elements is not defined."
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?

Guillaume <gyom>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by gyom (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-05-17 rik5 CategoryPlotting with OpenGL => Documentation
        Item GroupMatlab Compatibility => Documentation
        StatusNone => Confirmed
        SummaryNaN color with imagesc => Document how NaN color value is handled by imagesc

    Back to the top

    Powered by Savane 3.7