[Top][All Lists]

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

Re: Greek letters in plot legend

From: Ben Abbott
Subject: Re: Greek letters in plot legend
Date: Mon, 07 Sep 2009 11:55:51 -0400

On Sep 7, 2009, at 11:33 AM, Xin Dong wrote:

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?


See this page ..

The backslash is being interpreted as an escape sequence. What you need to correct it is ...

legend("\\eta=5", "\\eta=10", "\\eta=15", "\\eta=20", "location", "southwest");

... or replace the double-quotes with single-quotes ...

legend('\eta=5', '\eta=10', '\eta=15', '\eta=20', "location", "southwest");


reply via email to

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