bugGNU Octave - Bugs: bug #45725, doc says that get(gca,...


bug #45725: doc says that get(gca, "ytick") returns a 1x6 vector but 1x4 returned

Submitter:  Michael Godfrey <godfrey>
Submitted:  Sat 08 Aug 2015 07:21:48 PM UTC
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Godfrey Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


( Jump to the original submission )

Mon 24 Aug 2015 10:29:10 PM UTC, comment #8: 
Rik <rik5>
Project Administrator
Sun 23 Aug 2015 10:57:51 PM UTC, comment #7: 

@Rik: Sure, that is simplest. There may be cases
where additional information would help, but that can be addded

Michael Godfrey <godfrey>
Project Member
Sun 23 Aug 2015 07:15:55 PM UTC, comment #6: 

@Michael: I think Pantxo's suggestion to just not print a default for an auto-calculated property like 'xtick' may be the right way to go.  It is not the case that the number of tick marks must be 2 or greater.  In fact, the correct way to remove tick marks is to set the value to the empty set.

set (gca, 'xtick', []);   # remove all xtick marks

Rik <rik5>
Project Administrator
Mon 10 Aug 2015 03:17:03 PM UTC, comment #5: 

Pantxo: Suppressing the current def. message is one choice,
but I will at least look at changing the messages
to read, for example for xtick: def: [0:0.2:1]
   Position of x tick marks. The number of tick marks must
   be 2 or greater. .... 

Michael Godfrey <godfrey>
Project Member
Sun 09 Aug 2015 10:59:17 AM UTC, comment #4: 

@Michael: It is possible to not display the default value of a property when it has no sense (such as axes ticks which are by default generated automatically depending on plotted data). Just set the "printdefault" field of the property structure false in genpropdoc.m.

Pantxo Diribarne <pantxo>
Project Member
Sun 09 Aug 2015 09:20:16 AM UTC, comment #3: 

Mike M:

I will do a documentation patch, but you might be interested
in bugs #45710 and #45716. #45710 is the more serious
since it is a regression from 4.0.0. I am quite sure that
the behavior shown in #45716 never worked right.

It was the 45710 bug that started me modifying my
code to work around it and re-discovering how x(y)tick
and x(y)lim actually work...

Michael Godfrey <godfrey>
Project Member
Sat 08 Aug 2015 09:46:22 PM UTC, comment #2: 

Right. I was just figuring it out, but could
have remembered sooner.

Should leave this open until a documentation
patch is gotten together.

Anyhow, thanks for reminding me!!

Michael Godfrey <godfrey>
Project Member
Sat 08 Aug 2015 09:09:35 PM UTC, comment #1: 

You're referring to the "def. 1-by-6 double" label in the manual, right?

This came about as a result of bug #42536 that you helped work on to ensure that the graphics properties show the correct default values. The "1-by-6 double" is supposed to be the way it's showing you the default value, but not that it always has to be a 1-by-6 vector.

The property can be completely arbitrary, depending on whether the axes is labeled manually or automatically:

octave:16> plot (randn (100, 1));
octave:17> get (gca, "ytick")
ans =

  -3  -2  -1   0   1   2   3

octave:18> set (gca, "ytick", 0)
octave:19> get (gca, "ytick")
ans = 0

Do you want to update how this is described in the manual?

Mike Miller <mtmiller>
Project Administrator
Sat 08 Aug 2015 07:21:48 PM UTC, original submission:  

Most of the time get(gca, "ytick") returns a vector of length 6.
But, not always:

vticks = get(gca, "ytick")
yticks =

   4.5000   5.0000   5.5000   6.0000


This makes its use a bit difficult.

Michael Godfrey <godfrey>
Project Member


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

Attach Files:

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 pantxo (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by godfrey (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 project members can vote.





    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-08-24 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2015-08-08 mtmiller CategoryPlotting Documentation
        Item GroupIncorrect Result Documentation
        StatusNone Need Info

    Back to the top

    Powered by Savane 3.9