help-octave
[Top][All Lists]
Advanced

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

Re: Turn off TeX for legend labels


From: Andy Buckle
Subject: Re: Turn off TeX for legend labels
Date: Wed, 15 Apr 2009 15:05:41 +0100

On Wed, Apr 15, 2009 at 2:41 PM, Ben Abbott <address@hidden> wrote:
> On Wednesday, April 15, 2009, at 08:01AM, "andy buckle" <address@hidden> 
> wrote:
>>
>>
>>Ben Abbott wrote:
>>>
>>> Perhaps I'm confused. What objects do you expect this to impact?
>>>
>>
>>I am just trying stuff, to try and make it work.
>>
>>Let's say we have a plot with 3 curves on. you might want different settings
>>for the legend labels for each curve. Indeed
>>
>>octave> get(get(gca,"children")(1))
>>
>>shows you that the 'keylabel' and 'interpreter' for the legend are accessed
>>via the plot handle.
>
> You've infered incorrectly. The plot handle is for the line objects, not the 
> axes. The two examples below should be equivalent.
>
> h = plot (0:10);
> set (h, "interpreter", "none")
>
> plot (0:10, "interpreter", "none")
>
>>perhaps there is alternative workaround. Is there something like the HTML
>><pre> in TeX?
>
> I'm unfamiliar with HTML.
>
> Regarding a workaround, did you catch the one I posted yesterday?
>
>> octave:1> x = 0:0.1:5;
>> octave:2> plot(x,sin(x),x,cos(x))
>> octave:3> legend ("\\alpha", "\\beta")
>> octave:4> set (findobj (gca, "-property", "keylabel"), "interpreter", "none")
>
> Ben
>

That's a bug then (3.0.1)

octave> x=0:.2:6; y1 = sin(x); y2 = cos(x);
octave> plot(x,y1,x,y2)
octave> legend("sin(x)", "cos(x)")
octave> get(get(gca,"children")(1),"keylabel")
ans = sin(x)
octave> get(get(gca,"children")(2),"keylabel")
ans = cos(x)

this

set (findobj (gca, "-property", "keylabel"), "interpreter",   "none")

stopped rendering Greek, but underscores still yield subscripted characters.

HTML <pre> means pre-formatted. Is there a way in TeX to stop TeX
interpretation of part of a string?


reply via email to

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