bugGNU Octave - Bugs: bug #42766, incorrect color patches for...

 
 

bug #42766: incorrect color patches for countourf with NaNs in data

Submitter:  None
Submitted:  Mon 14 Jul 2014 03:42:01 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Andreas Stahel Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 15 Dec 2016 06:11:26 PM UTC, comment #4: 

This issue is still present in Octave 4.2.0.

The code sample from comment #3 still gives an upper "line" that consists of several differently colored triangles.

Hartmut <hardy>
Sat 01 Nov 2014 08:45:20 PM UTC, comment #3: 

Thanks for the '-Inf' workaround.
It has proven useful in another case

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).


John Hunt <huntj>
Sun 03 Aug 2014 05:25:28 PM UTC, comment #2: 

Ther is a woraround
Replace all NaN by -Inf and contourf() will produce the expected result

Andreas Stahel <sha1>
Mon 14 Jul 2014 04:37:35 AM UTC, comment #1: 

Confirmed.  This is almost certainly related to bug #37501.

Rik <rik5>
Group administrator
Mon 14 Jul 2014 03:42:01 AM UTC, original submission:  

For a visualization I use colored contour plots, with some data
being NaN. All versions of Octave I used showed servere
problems when multiple data points were missing
A comercial product produced the correct coloring.
See the enclosed, constructed sample code.

It might be a bug in Octave.
It might be related to bug #37501 and #35033

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #32352:  bothsides-inf.png added by huntj (103KiB - image/png)
file #32353:  bothsides+inf.png added by huntj (89KiB - image/png)
file #31711:  contourfNaNbug.m added by None (143B - text/x-objcsrc)

 

Carbon-Copy List
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by huntj (Updated the item)
  • -email is unavailable- added by sha1 (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-11-26 rik5 Dependencies- bugs #57310 is dependent
    2014-11-01 huntj Attached File- Added bothsides-inf.png, #32352
        Attached File- Added bothsides+inf.png, #32353
    2014-07-14 rik5 Dependencies- Depends on bugs #37501
    2014-07-14 rik5 StatusNone Confirmed
        Summaryincorrect color patches for countourf incorrect color patches for countourf with NaNs in data
    2014-07-14 None Attached File- Added contourfNaNbug.m, #31711

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code