octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #37501] contourf incorrect when NaN present on


From: Rik
Subject: [Octave-bug-tracker] [bug #37501] contourf incorrect when NaN present on boundary
Date: Wed, 31 Oct 2012 16:34:13 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0

Update of bug #37501 (project octave):

                  Status:               Need Info => Confirmed              
                 Summary: contour produces incorrect print figure => contourf
incorrect when NaN present on boundary

    _______________________________________________________

Follow-up 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.


contourf (X(:,2:end-1), Y(:,2:end-1), data(2:end-1))


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.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37501>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]