bugGNU Octave - Bugs: bug #59067, Implementation of xtickangle(),...

 
 

bug #59067: Implementation of xtickangle(), ytickangle() and ztickangle()

Submitter:  Guillaume <gyom>
Submitted:  Sat 05 Sep 2020 04:34:09 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 05 Nov 2020 04:21:15 AM UTC, comment #3: 

I added xtickangle and _tickangle_ to Octave under Guillaume's name in this cset: http://hg.savannah.gnu.org/hgweb/octave/rev/5e62adcdcaa2.

Using xtickangle.m as a template, I added ytickangle.m, ztickangle.m in this changeset http://hg.savannah.gnu.org/hgweb/octave/rev/447beb85551d.


Marking as fixed and closing report.

Rik <rik5>
Group administrator
Mon 07 Sep 2020 06:20:39 PM UTC, comment #2: 

Thanks. I attach a new, simplified version that uses a common _tickangle_() function. One issue I have is that some of the tests checking for errors will call gca() and therefore open a new figure.

(file #49758, file #49759)

Guillaume <gyom>
Sat 05 Sep 2020 06:01:07 PM UTC, comment #1: 

Yes, it makes sense to me that these x,y,z functions are implemented in a common core function if possible.

I don't see xticklabelrotationmode mentioned in the Matlab docs.  Is it intentionally undocumented?  If so, should we also mark it as hidden?

John W. Eaton <jwe>
Group administrator
Sat 05 Sep 2020 04:34:09 PM UTC, original submission:  

Since R2016b, Matlab has helper functions to rotate the tick labels:
https://www.mathworks.com/help/matlab/ref/xtickangle.html
acting as wrappers around the XTickLabelRotation and XTickLabelRotationMode properties of axes:
https://www.mathworks.com/help/matlab/ref/matlab.graphics.axis.axes-properties.html#budumk7-XTickLabelRotation

XTickLabelRotation is available in Octave but unused, while XTickLabelRotationMode would still need to be added (and allowed to take values "auto" and "manual").

I attach a possible implementation of xtickangle.m. When writing the help text, I came across xticklabels.m which is very similar: I could rewrite xtickangle.m to use a similar layout (with switch/endswitch). Given xtickangle(), ytickangle() and ztickangle() are nearly identical, would it be useful to have them call a generic _tickangle_()?

Even if the actual rotation of the tick angles is not yet implemented in Octave, having these functions in place would contribute to Matlab compatibility as it would replace a crash with a no-op.

Guillaume <gyom>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #49758:  xtickangle.m added by gyom (3KiB - text/x-objcsrc)
file #49759:  __tickangle__.m added by gyom (2KiB - text/x-objcsrc)
file #49745:  xtickangle.m added by gyom (6KiB - text/x-objcsrc)

 

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 jwe (Posted a comment)
  • -email is unavailable- added by gyom (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-05 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2020-09-07 gyom Attached File- Added xtickangle.m, #49758
        Attached File- Added _tickangle_.m, #49759
    2020-09-05 gyom Attached File- Added xtickangle.m, #49745

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code