octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #54436] get (gca, 'yticklabel') returns cellst


From: Rik
Subject: [Octave-bug-tracker] [bug #54436] get (gca, 'yticklabel') returns cellstr row vector versus cellstr column vector in Matlab
Date: Fri, 3 Aug 2018 14:20:06 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Update of bug #54436 (project octave):

                  Status:               Need Info => Confirmed              
        Operating System:                  Mac OS => Any                    
                 Summary: yticklabel difference with Matlab => get (gca,
'yticklabel') returns cellstr row vector versus cellstr column vector in
Matlab

    _______________________________________________________

Follow-up Comment #6:

So, it would seem that the general rule is that numeric vectors are *always*
row vectors, while cell array of strings are always column vectors.  Octave is
consistent in producing row vectors for both data types.  Changing this
doesn't look straightforward, so it is probably easier to change code to make
it independent of the particular orientation.  An easy workaround is to use
'(:)' to force a column vector orientation.  In other words,


labels = get (gca, 'yticklabel');
->
labels = get (gca, 'yticklabel')(:);
OR
labels = get (gca, 'yticklabel');
labels = labels(:);




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54436>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]