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

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

[Octave-bug-tracker] [bug #31468] multi-line text objects


From: Ben Abbott
Subject: [Octave-bug-tracker] [bug #31468] multi-line text objects
Date: Wed, 08 Dec 2010 13:11:29 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 Safari/534.10

Follow-up Comment #4, bug #31468 (project octave):

(repost of David's comment)

Am I missing something, but can't this be fixed by adding something like


 if (iscellstr (txt))
   ## Treat cell string array as multi-line text
   txt(1:2:2*numel(txt)) = txt;
   txt(2:2:2*numel(txt)) = "n";
   txt = [txt{:}];
 endif


to the top of the __axis_label__ function? The "text" function already treat
cell string arrays as multiple calls to the text function with different
values of "x", "y" and "z". Therefore "x", "y" and "z" are expected to have
as
many elements as there are elements in the cell string array. 

So as far as I can tell __axis_label__ is the only function that needs to be
treated in this way. Does it make sense to treat multiline strings in tick
labels? If so then we'd need to treat this feature request in graphics.cc as
the ticklabels might be set directly from the handle.

Can Matlab set multiline text in the handle directly? What does matlab give
for something like


h = title('One Line');
set (h, 'string', {'Two','lines'})


give in matlab. If the above works, maybe the text objects themselves should
be adapted to handle cell string arrays.

D.

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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