bugGNU Octave - Bugs: bug #36094, Incorrect axis limit calculation


bug #36094: Incorrect axis limit calculation

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

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)

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>
Project 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>
Project 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>
Project Administrator
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.

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

Rik <rik5>
Project 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!

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

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

Given the following code:

for i=1:10

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.



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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -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)

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

    Only project members can vote.




    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    17:32 mtmiller Carbon-CopyRemoved 80942 => -
    16:09 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.3