bugGNU Octave - Bugs: bug #64265, setting "xticks"...

 
 

bug #64265: setting "xticks" property results in "xticklabels" with too many significant digits

Submitter:  Rik <rik5>
Submitted:  Wed 31 May 2023 04:28:01 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  In Progress Assigned to:  None
Originator Name:  rik5 Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 31 May 2023 05:37:53 PM UTC, comment #2: 

This changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/8b795293c050) gets Octave most of the way there.  The best permanent solution, however, would be to use the display routines within Octave for formatting, rather than the C++ standard library.

Rik <rik5>
Group administrator
Wed 31 May 2023 04:29:04 AM UTC, comment #1: 

Resulting plot:


Rik <rik5>
Group administrator
Wed 31 May 2023 04:28:01 AM UTC, original submission:  

Sample code:


rand ("state", 1);
y = rand + 0:10;
plot (1:10);
set (gca, 'ytick', y)


Resulting plot

file #ticklabel_fmt.png

The number of significant digits varies from 6 to 7, while Matlab or Octave's own disp() routine show just 5.

Rik <rik5>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #54798:  ticklabel_fmt.png added by rik5 (28KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-05-31 rik5 StatusConfirmed In Progress
    2023-05-31 rik5 Attached File- Added ticklabel_fmt.png, #54798

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code