[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Two lined title on plot
From: |
Philip Nienhuis |
Subject: |
Re: Two lined title on plot |
Date: |
Tue, 5 Apr 2011 13:04:42 -0500 (CDT) |
martin_helm wrote:
>
> Am Dienstag, 5. April 2011, 17:51:49 schrieb dirac:
> > hi there,
> >
> > I have been trying to put a two lined title on to a plot I am working
> on at
> > the moment. I have seen some suggestions from the matlab forum
> already:
> >
> > title({'line1','line2'})
> >
> > and
> >
> > title('line1 \newline line2')
> >
> > But they both don't work. I don't know if it is because I am using a
> > macbook or if these commands don't work in Octave. I also saw another
> > solution from the Octave (this!) forum:
> >
> > title("foo\nbar")
> >
> > But this doesn't work for my problem where I am concatenating things
> in the
> > command:
> >
> > title(cstrcat('Normalised Histogram and Gaussian fit of the
> > ',num2str(days),' daily returns for the stock AstraZeneca PLC'))
> >
> >
> >
> > Is there a way to put this on two lines?
> > Thanks
> > Martin
> >
>
> This example works well with 3.4
>
> title(cstrcat("Normalised Histogram and Gaussian fit \nof the
> ",num2str(days),"
> daily returns\n for the stock AstraZeneca PLC"))
>
> (Just for fun I used 3 lines)
> You have to use "" for the strings.
>
Sure, this works OK in GNUplot, but not so nice in FLTK as the glyph
renderer produces hickups on control characters like \n, \t, \r, ..... and
on text cell arrays.
A while ago I've sent patches for this to the bug tracker (#31468) for both
__ axis_label__.m (proposed earlier on by David Bateman) &
src/txt-eng-ft.cc (the actual glyph renderer).
Hopefully they'll be applied soon or perhaps someone can turn them into a
changeset (I'm still trying to find out how to do this myself easily, esp.
backing out).
Philip
--
View this message in context:
http://octave.1599824.n4.nabble.com/Two-lined-title-on-plot-tp3428433p3428756.html
Sent from the Octave - General mailing list archive at Nabble.com.