bugGNU Octave - Bugs: bug #33249, log plots with all negative data...

 
 

bug #33249: log plots with all negative data don't plot (FLTK)

Submitted by:  Carlo de Falco <cdf>
Submitted on:  Fri 06 May 2011 06:15:05 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Mac OS

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Thu 02 Feb 2012 06:25:20 PM UTC, comment #10:

The FLTK backend has been fixed to handle all negative data for some time now. Closing bug.

Rik <rik5>
Project Administrator
Fri 30 Sep 2011 08:21:52 PM UTC, comment #9:

Re-titling bug to reflect the actual remaining problem. The problem does not occur with gnuplot.

Sample code to provoke bug

Rik <rik5>
Project Administrator
Wed 07 Sep 2011 12:09:00 AM UTC, comment #8:

But should it be?

Seems useful to me.

Michael Godfrey <godfrey>
Project Member
Tue 06 Sep 2011 11:28:41 PM UTC, comment #7:

The warning was already commented out.

John W. Eaton <jwe>
Project Administrator
Tue 06 Sep 2011 10:52:44 PM UTC, comment #6:

John,

Did you mean to comment out the warning?
It might be helpful to tell the user why no
data appeared.

Michael

Michael Godfrey <godfrey>
Project Member
Tue 06 Sep 2011 10:10:54 PM UTC, comment #5:

I checked in the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/d44d7f3c7998

It avoids the crash for me. It does not fix logarithmic plotting of all negative data. That will be more work.

If others confirm that this patch fixes the crash, then maybe this report should be closed? You could open another about the failure to correctly plot the data.

John W. Eaton <jwe>
Project Administrator
Wed 31 Aug 2011 08:59:20 AM UTC, comment #4:

One more remark:
The crash does not happen when all the data is negative.
When the argument is a data matrix, the crash happens
only when the first column is all negative
as seen with this script.

## semilogy and loglog deal gracefully with partially negative inputs
## UNLESS the FIRST column of the data matrix is entirely negative
n = 5; # say
showbug = false ;
if showbug ## causes a bus error on semilogy(Z) ;
Z = [ -1*rand(n,1) randn(n,8) ] ; ## 9 colmuns, the first one is entirely negative (almost surely)
else
Z = [ randn(n,3) -1*rand(n,1) randn(n,5) ] ; ## The entirely negative column is not the first one.
endif
semilogy(Z) ;

JF Cardoso <jfcardoso>
Sun 08 May 2011 10:14:37 AM UTC, comment #3:

Just one more comment: Matlab does NOT throw an error for data that are all negative, for example the following

produces the plot attached, which is equivalent to

but with the y axis inverted

(file #23369)

Carlo de Falco <cdf>
Project Member
Sun 08 May 2011 04:14:18 AM UTC, comment #2:

Confirmed on a recent tip (2011/05/07). Interestingly, the problem is only when all of the data is negative. If there is some positive data, then a warning message is printed (warning: axis: omitting nonpositive data in log plot). The fix lies in graphics.cc around the axis limit code.

This is a regression as the following code worked, i.e., didn't produce a segfault in 3.2.4.

Rik <rik5>
Project Administrator
Fri 06 May 2011 07:18:33 PM UTC, comment #1:

well,
actually in the example I sent the negative data were on the y-axis
but the same happens if it is on the x-axis

the crash occurs with both gnuplot and fltk
c.

Carlo de Falco <cdf>
Project Member
Fri 06 May 2011 06:15:05 PM UTC, original submission:

The following consistently crashes Octave

Carlo de Falco <cdf>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by jfcardoso (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by cdf (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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 02 Feb 2012 06:25:20 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Fri 30 Sep 2011 08:21:52 PM UTCrik5CategoryPlotting=>Plotting with OpenGL
      Item GroupSegfault, Bus Error, etc.=>Incorrect Result
      Summarylog plots with all negative data produce segfault=>log plots with all negative data don't plot (FLTK)
    Sun 08 May 2011 10:14:37 AM UTCcdfAttached File-=>Added Screen shot 2011-05-08 at 11.45.45.png, #23369
    Sun 08 May 2011 04:14:18 AM UTCrik5StatusNone=>Confirmed
      Summarycrash in loglog with negative x-data=>log plots with all negative data produce segfault

    Back to the top


    Powered by Savane 3.1-cleanup1