bugGNU Octave - Bugs: bug #55876, Can not correctly set ylim...

 
 

bug #55876: Can not correctly set ylim sometimes in log plot

Submitter:  Eddy <count>
Submitted:  Sun 10 Mar 2019 02:56:55 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 10 Mar 2019 09:36:50 PM UTC, comment #3: 

Thank you for the fast fix! Confirm it is working.

The changeset should be http://hg.savannah.gnu.org/hgweb/octave/rev/69722280102c

Eddy <count>
Sun 10 Mar 2019 06:01:07 PM UTC, comment #2: 

Markus' patch works fine for me.  ylim() values now stay at the values set by the programmer.  Marking as fixed and closing report.

Rik <rik5>
Group administrator
Sun 10 Mar 2019 05:31:34 PM UTC, comment #1: 

I pushed a patch that should fix this issue on the default branch here:
http://hg.savannah.gnu.org/hgweb/octave/rev/7506884fc158

The bug occurs if both axis limits are small compared to sqrt(eps("double")) (on a linear scale).

Markus Mützel <mmuetzel>
Group administrator
Sun 10 Mar 2019 02:56:55 PM UTC, original submission:  

An example is:
(Octave version 5.0.91 built from source, Debian 9):


1> semilogy (logspace (-30, 1, 100))
2> ylim ([2e-27   3e-13])
3> ylim ()
ans =

   2.0000e-29   3.0000e-11

4> set (gca, 'ytick', [1e-25   1e-20]);  % slow here
5> ylim ()
ans =

   2.0000e-31   3.0000e-09

6> length (get (gca, 'yminortickvalues'))
ans =  27000287


Setting of ylim lead to different bounds, and the bounds could change due to setting of 'ytick'. Also the minor ticks after setting ytick is weird.

This happens in version 4.4.1 and 5.1.0 also, although the detailed behavior may be different. Seems no problem in version 4.0.3.

A probably related bug is: after the semilogy above, try zooming into small range using GUI (say fltk). The zoom in y direction would be "blocked" up to some scale (say 10^-16 ~ 10^-8), i.e. cannot zoom in too much.

Due to this bug, I sometimes could not workaround bug #55864 by manually setting axis ticks.

Eddy <count>

 

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

Attach Files:
   
   
Comment:
   

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 rik5 (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by count (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-10 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2019-03-10 mmuetzel StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code