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: PlottingSeverity: 3 - Normal
Priority: 3 - LowItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: Ron EvansOriginator Email: -unavailable-
Open/Closed: OpenRelease: 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 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 File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by hardy (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by None (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 04 Jun 2015 01:23:29 AM UTCmtmillerPriority5 - Normal=>3 - Low
      Operating SystemMicrosoft Windows=>Any
    Thu 05 Apr 2012 08:38:34 PM UTCrik5StatusNone=>Confirmed
      Summaryplot problem=>Incorrect axis limit calculation

    Back to the top

    Powered by Savane 3.1-cleanup1