bugGNU Octave - Bugs: bug #36094, opengl single precision plotting...

 
 

bug #36094: opengl single precision plotting produces incorrect axis limits

Submitter:  None
Submitted:  Wed 04 Apr 2012 10:53:39 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  3 - Low Item Group:  Incorrect Result
Status:  Need Info Assigned to:  None
Originator Name:  Ron Evans Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 18 Apr 2023 07:54:34 PM UTC, comment #9: 

seeing as how this problem stems from the bug #32980 OpenGL single precision plotting issue, is the 'implement scaling before drawing' mentioned in 2016 still a viable approach to work around this specific issue?

If not should this get closed as a won't fix pending some eventual more general work around to OpenGL not likely leaving single precision any time soon?

Nicholas Jankowski <nrjank>
Group Member
Thu 12 Mar 2020 02:57:52 AM UTC, comment #8: 

the behavior in comment #6 still exists in Octave 5.2.0

Nicholas Jankowski <nrjank>
Group Member
Sun 20 Nov 2016 02:59:48 PM UTC, comment #7: 

This is all utlimately related to the use of singel in OpenGL and will be fixed when we implement scaling before drawing in the OpenGL toolkits.

Rik <rik5>
Group administrator
Sat 19 Nov 2016 09:22:27 PM UTC, comment #6: 

This issue (at least partly) remains with Octave 4.2.0.

  • With graphics_toolkit gnuplot the results look fine now (for both demo scripts, from comment #0 and comment #3).
  • With the other two graphics_toolkits fltk and qt the plot looks pretty narrow and empty. There is no line displayed at all.


(According to comment #5 this worked a bit better at some time inbetween, at least with fltk.)

Hartmut <hardy>
Thu 04 Jun 2015 04:25:14 AM UTC, comment #5: 

The sample code in comment #0 or comment #3 "works" for me in the sense that it plots a vertical line.  This is with the FLTK branch and hg id 78293a28f2a5.

Rik <rik5>
Group administrator
Thu 04 Jun 2015 01:23:29 AM UTC, comment #4: 

The new behavior on the current development branch is that the plot shows nothing, not a vertical line nor a sloped line.

With gnuplot it can be fixed by manually setting the x-axis limits.

With OpenGL plotting, setting the limits causes nothing to be plotted, probably because of the single-precision limit of OpenGL plotting (see bug #32980).

Mike Miller <mtmiller>
Group Member
Thu 05 Apr 2012 08:38:34 PM UTC, comment #3: 

Confirmed on a recent tip.  The problem is almost certainly that the data differences are small and the plot code is not setting the correct x-axis limits.  If I manually set the limits, for example, the data correctly shows as a sloping line rather than a vertical one.

The following code is simpler and demonstrates the problem is with the magnitude of the values involved.


graphics_toolkit gnuplot;
x = 1e5 + 1e-5*(1:10);
plot (x, 1:10)


If the magnitude of the small steps is changed just a little bit than the plot works.


x = 1e5 + 1e-4*(1:10);
plot (x, 1:10)



Rik <rik5>
Group administrator
Thu 05 Apr 2012 03:04:34 PM UTC, comment #2: 

Matlab has same results you got... actual values are different since I ran it at a different time than you.  Helps to put a pause(.5) in the loop but still not big enough difference.  I suspect your reference to improper scaling for very small differences is correct.
Thanks for looking at it!

Anonymous
Wed 04 Apr 2012 11:54:06 PM UTC, comment #1: 

Note that in Octave the x vector is:
Columns 1 through 5:

   734963.825237522   734963.825237753   734963.825237788   734963.825237822   734963.825237904

 Columns 6 through 10:

   734963.825237942   734963.825237977   734963.825238010   734963.825238045   734963.825238080

What is it in Matlab?  Correct scaling for very small
differences has been discussed a bit, but likely not
coded.

Michael Godfrey <godfrey>
Group Member
Wed 04 Apr 2012 10:53:39 PM UTC, original submission:  

Given the following code:

for i=1:10
   y(i)=i;
   x(i)=now;
end
plot(x,y);

The plot will be rendered as a vertical line, even if
followed by datetick('x',13).  Tested on Matlab and it
works fine. 

Using x(i)=rem(now,1)... just the remainder, plots fine.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by pantxo (Updated the item)
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by godfrey (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 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-04-18 nrjank Dependencies- Depends on bugs #59418
    2023-04-18 nrjank SummaryIncorrect axis limit calculation opengl single precision plotting produces incorrect axis limits
    2023-04-18 nrjank StatusConfirmed Need Info
    2018-10-22 mtmiller Carbon-CopyRemoved 80942 -
    2018-10-22 pantxo CategoryPlotting Plotting with OpenGL
    2015-06-04 mtmiller Priority5 - Normal 3 - Low
        Release3.6.1 dev
        Operating SystemMicrosoft Windows Any
    2012-04-05 rik5 StatusNone Confirmed
        Summaryplot problem Incorrect axis limit calculation

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code