[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #31468] multi-line text objects
From: |
Vanya Sergeev |
Subject: |
[Octave-bug-tracker] [bug #31468] multi-line text objects |
Date: |
Thu, 11 Aug 2011 10:37:22 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1 |
Follow-up Comment #10, bug #31468 (project octave):
I was interested in cell-based multi-line titles in Octave 3.4.2, and
discovered this bug report.
The __axis_label__.m patch below works but it produces extra newlines at the
end for me. For example:
txt = {'line1', 'line2', 'line3'};
txt(1:2:2*numel(txt)) = txt;
txt(2:2:2*numel(txt)) = "Z";
txt = [txt{:}];
yields:
txt = line1Zline2Zline3ZZZ
(The second line forgets to take into account that the cell length has been
doubled by the first, so as many extra newlines as there were original
elements are added at the end)
This does the trick for me:
if (iscellstr (txt))
## Treat cell string array as multi-line text
txt(1:2:2*numel (txt)) = txt;
txt(2:2:numel (txt)) = "n";
txt = [txt{:}];
endif
Thanks,
~vsergeev
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31468>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #31468] multi-line text objects,
Vanya Sergeev <=
- [Octave-bug-tracker] [bug #31468] multi-line text objects, Ben Abbott, 2011/08/11
- [Octave-bug-tracker] [bug #31468] multi-line text objects, Philip Nienhuis, 2011/08/11
- [Octave-bug-tracker] [bug #31468] multi-line text objects, Ben Abbott, 2011/08/11
- [Octave-bug-tracker] [bug #31468] multi-line text objects, Vanya Sergeev, 2011/08/11
- [Octave-bug-tracker] [bug #31468] multi-line text objects, Vanya Sergeev, 2011/08/11
- [Octave-bug-tracker] [bug #31468] multi-line text objects, Ben Abbott, 2011/08/11
- [Octave-bug-tracker] [bug #31468] multi-line text objects, Vanya Sergeev, 2011/08/11
- [Octave-bug-tracker] [bug #31468] multi-line text objects, Ben Abbott, 2011/08/12
- [Octave-bug-tracker] [bug #31468] multi-line text objects, Jordi GutiƩrrez Hermoso, 2011/08/12
- [Octave-bug-tracker] [bug #31468] multi-line text objects, Ben Abbott, 2011/08/12