bugGNU Octave - Bugs: bug #55038, ytick property doesn't return all...

 
 

bug #55038: ytick property doesn't return all ticks

Submitter:  Fabio <efferre79>
Submitted:  Fri 16 Nov 2018 03:21:46 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.4.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 19 Nov 2018 11:36:40 AM UTC, comment #3: 

I confirm the referenced commit fixes my problem, thanks

Fabio <efferre79>
Mon 19 Nov 2018 01:31:55 AM UTC, comment #2: 

A changeset was just checked in for bug #50509 (https://hg.savannah.gnu.org/hgweb/octave/rev/2e0500c57795) that fixes this issue.  It will be a part of the Octave 5.0 release scheduled for the end of the year.  Or you can grab the change directly from the Mercurial repository in the meantime.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Fri 16 Nov 2018 03:29:02 PM UTC, comment #1: 

possible duplication of bug #50509?

Fabio <efferre79>
Fri 16 Nov 2018 03:21:46 PM UTC, original submission:  

I am not sure this bug is related to octave or to gnuplot.

I have large numbers on an axis whose labels are represented with an exponential notation and I am using gnuplot as backend. After plotting I want to change the labels of the ticks with the following command:

set(gca,'yticklabel',sprintf('%.1f|', get(gca,'ytick')))

Most of the time the trick works but for the dataset here attached the ticks showed in the plot is larger than the set returned by get(gca,'ytick'). This means that the previous command overwrites only a few of the ticklabels (see attached figure).

I found a workaround i.e. to put an explicit statement

set(gca,'ytick', get(gca,'ytick'))

before the previous one to clean the ticks. Looking at differences in the gnuplot generated code it seems a gnuplot command

set ytics add in scale ...

is added after setting the xticklabels. Is the "add" keyword really needed? shouldn't set(gca, 'yticklabel', ...) overwrite all the labels?

Fabio <efferre79>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #45449:  test.m added by efferre79 (235B - text/x-objcsrc)
file #45451:  test.dat added by efferre79 (10KiB - chemical/x-mopac-input)

 

Digest:
   bug dependencies.

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

    Date Changed by Updated Field Previous Value => Replaced by
    2018-11-19 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2018-11-16 rik5 Dependencies- Depends on bugs #50509
    2018-11-16 efferre79 Attached File- Added test.m, #45449
        Attached File- Added after_setting_yticklabel.png, #45450
        Attached File- Added test.dat, #45451
        Attached File- Added before_setting_yticklabel.png, #45452

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code