bugGNU Octave - Bugs: bug #46484, datetick does not...

 
 

bug #46484: datetick does not "keeplimits"

Submitted by:  None
Submitted on:  Fri 20 Nov 2015 07:43:49 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Lars K.Originator Email: -unavailable-
Open/Closed: ClosedRelease: 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.

 

Sun 31 Jan 2016 08:27:13 PM UTC, comment #4:

Pushed here:
http://hg.savannah.gnu.org/hgweb/octave/rev/446bab5da2f7

Sorry for the delay, got a bit distracted.
Thanks for the contribution.

Closing report

Philip Nienhuis <philipnienhuis>
Project Member
Sat 12 Dec 2015 07:00:17 PM UTC, comment #3:

Thanks, that's me.

Lars Kindermann <larskindermann>
Sat 12 Dec 2015 05:02:30 PM UTC, comment #2:

Your patch looks to work OK.

Would you like to be credited? if so could you supply your full name, please?

Philip Nienhuis <philipnienhuis>
Project Member
Sat 12 Dec 2015 02:04:06 PM UTC, comment #1:

The datetick.m included in Octave always calculates tick positions from min and max of the data, while it should do so from min and max of the axis limit when the "keeplimits" option is given.

This means setting a new "xlim" followed by "datetick x keeplimits" will not provide meaningful tick positions.

This is a bug in Octave, Matlab does it right.

Why this is important:

There are several third party tools which provide zoom- and pan-able date-axes like "datetickx" or "dynamicDateticks". They will not work with the current datetick.m, neither any attempt to provide own scalable date axes.

The attached patch fixes it, could somebody please include it in the source?

Anonymous
Fri 20 Nov 2015 07:43:49 PM UTC, original submission:

When datetick() is called with the "keeplimits" argument it should conserve the xlim resp. ylim property of the axis. That is the intended behavior and also what matlab does. At the moment, however, datetick.m always recalculates the limits based on the data. As a result it is not possible to reapply date labels after zooming in either from the gui or calling the xlim() or ylim() function:

This patch will fix it:

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

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 larskindermann (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 31 Jan 2016 08:27:13 PM UTCphilipnienhuisStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1