[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Two lined title on plot
From: |
Martin Helm |
Subject: |
Re: Two lined title on plot |
Date: |
Tue, 5 Apr 2011 18:16:06 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.1; x86_64; ; ) |
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.
test.gif
Description: GIF image