[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Turn off TeX for legend labels
From: |
Ben Abbott |
Subject: |
Re: Turn off TeX for legend labels |
Date: |
Wed, 15 Apr 2009 10:45:28 -0400 |
On Wednesday, April 15, 2009, at 10:38AM, "Ben Abbott" <address@hidden> wrote:
>
>
>On Wednesday, April 15, 2009, at 10:05AM, "Andy Buckle" <address@hidden> wrote:
>>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.
>
>ahhhh, ok!
>
>I see your point. That is a bug, and it exists in the developers sources as
>well. In fact, I see the same behavior for text objects.
>
>>HTML <pre> means pre-formatted. Is there a way in TeX to stop TeX
>>interpretation of part of a string?
>
>In TeX, I'd use "\_". This does work for text objects, but it isn't working
>for me for the legend labels.
>
>Can you confirm the same behavior?
>
>Ben
ok, my bad. The syntax below works
plot (x, sin(x), x, cos(x))
legend ("test\\_1", "test\\_2")
Ben
- Re: Turn off TeX for legend labels, (continued)
- Re: Turn off TeX for legend labels, Ivan Sutoris, 2009/04/14
- Re: Turn off TeX for legend labels, Ben Abbott, 2009/04/14
- Re: Turn off TeX for legend labels, Ben Abbott, 2009/04/15
- Re: Turn off TeX for legend labels, Ben Abbott, 2009/04/15
- Re: Turn off TeX for legend labels, Ben Abbott, 2009/04/20