bugGNU Octave - Bugs: bug #37501, contourf incorrect when NaN...

 
 

bug #37501: contourf incorrect when NaN present on boundary

Submitted by:  Muhali <muhali>
Submitted on:  Thu 04 Oct 2012 12:14:45 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: 3.6.3Operating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Wed 31 Oct 2012 04:34:13 PM UTC, comment #5:

I notice that the 2-D data you are plotting with contourf has columns of NaN values on the far left and far right. If I strip out the NaNs the contourf plot looks exactly right.

It would be nice for Octave to behave better in this situation, but it is probably somewhat difficult to untangle. You might want to just use the workaround of removing the NaNs from your data.

For those interested, the file to check is scripts/plot/private/__contour__.m. Maybe we want to add a grid around the plotted data with a value that is always numerical and always small, such as -Inf, so that the contours will always close. Then when plotting we can remove the grid. This way the NaNs on the border will still close.

Rik <rik5>
Project Administrator
Thu 04 Oct 2012 03:41:45 PM UTC, comment #4:

> Which graphics backend are you using?


For the attached figures fltk, but I see the same with gnuplot.

Muhali <muhali>
Thu 04 Oct 2012 03:35:29 PM UTC, comment #3:

Which graphics backend are you using?

Michael Godfrey <godfrey>
Thu 04 Oct 2012 02:51:09 PM UTC, comment #2:

The original print figure, which was from my office machine, is attached (contour.png). On my home machine I cannot reproduce it either, and interestingly, not even when I use my office machine remotely.

But I can reproduce the contourf behavior,

with a similar straight line from NW to S as in contour.png (contourf.png attached).

(file #26699, file #26700)

Muhali <muhali>
Thu 04 Oct 2012 01:17:05 PM UTC, comment #1:

I can't see the problem you're describing. Can you please post a few screenshots and images, perhaps annotating them with the precise problem? Also, can you test both gnuplot and fltk?

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Thu 04 Oct 2012 12:14:45 PM UTC, original submission:

Using the attached foo.txt and doing

the plot figure is different from the print figure. The print figure seems to have the same error as the plot from using contourf.

Muhali <muhali>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #26699:  contour.png added by muhali (73kB - image/png)
file #26700:  contourf.png added by muhali (113kB - image/png)
file #26697:  foo.txt added by muhali (31kB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by muhali (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 31 Oct 2012 04:34:13 PM UTCrik5StatusNeed Info=>Confirmed
      Summarycontour produces incorrect print figure=>contourf incorrect when NaN present on boundary
    Thu 04 Oct 2012 02:51:09 PM UTCmuhaliAttached File-=>Added contour.png, #26699
      Attached File-=>Added contourf.png, #26700
    Thu 04 Oct 2012 01:17:05 PM UTCjordighStatusNone=>Need Info
    Thu 04 Oct 2012 12:14:45 PM UTCmuhaliAttached File-=>Added foo.txt, #26697

    Back to the top


    Powered by Savane 3.1-cleanup