--- Begin Message ---
Subject: |
Re: Greek letters in plot legend |
Date: |
Mon, 07 Sep 2009 18:03:53 +0200 |
Am Montag, den 07.09.2009, 10:33 -0500 schrieb Xin Dong:
> Hi all,
>
> I need Greek letters in plot legend. I use the command:
> legend("\eta=5", "\eta=10", "\eta=15", "\eta=20", "location",
> "southwest");
>
>
> However, octave cannot parse "\eta". The interesting thing is if I use
> "\alpha" or "\theta", it can be successfully displayed. I tried it on
> Octave 3.0.1 on Unbuntu 9.04 and Octave 3.2.2 on Mac OS X, both have
> the same problem.
>
> Can anyone give some advice?
depends on what you need to do.
If you want to see it on the monitor, i can't help you.
If you need it in files, I have an advise for you:
octave:1> x=0:0.01:2*pi;
octave:2> y=sin(x);
^^ I plot something
octave:3> plot(x,y,'.-b;\$sin(\eta)$;');
^^ I use latex stuff for the greek letters -
gnuplot complains
octave:4> enhanced text mode parser - ignoring spurious }
enhanced text mode parser - ignoring spurious }
enhanced text mode parser - ignoring spurious }
octave:4> print("test.tex", "-depslatexstandalone")
^^ I use the print command, specifiny epslatexstandalone as file type
enhanced text mode parser - ignoring spurious }
enhanced text mode parser - ignoring spurious }
enhanced text mode parser - ignoring spurious }
This yields those two files:
$ ls test*
test-inc.eps test-inc.pdf test.tex
then:
$ epstopdf test-inc.eps
$ pdflatex test.tex
this yields this pdf: (see attachment)
>
> Thanks,
> Xin
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
--
Thomas Ilnseher <address@hidden>
test.pdf
Description: Adobe PDF document
--- End Message ---