help-octave
[Top][All Lists]
Advanced

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

Re: how to avoid '_' interpretation in plot legend ?


From: Ben Abbott
Subject: Re: how to avoid '_' interpretation in plot legend ?
Date: Mon, 06 Jul 2009 10:56:04 -0400

On Monday, July 06, 2009, at 10:48AM, "Sergei Steshenko" <address@hidden> wrote:
>
>--- On Mon, 7/6/09, Ben Abbott <address@hidden> wrote:
>
>> From: Ben Abbott <address@hidden>
>> Subject: Re: how to avoid '_' interpretation in plot legend ?
>> To: "Sergei Steshenko" <address@hidden>
>> Cc: address@hidden
>> Date: Monday, July 6, 2009, 7:40 AM
>> 
>> On Monday, July 06, 2009, at 08:59AM, "Sergei Steshenko"
>> <address@hidden>
>> wrote:
>> >
>> >Hello,
>> >
>> >if I enter, say, the following command:
>> >
>> >plot(1:10, 1:10, "-;foo_bar;1");
>> >
>> >, I'm getting straight red line plotted (and this is
>> expected), but the 
>> >legend says
>> >
>> >foobar
>> >
>> >with 'b' being below the rest of characters and having
>> smaller size - 
>> >instead of the expected
>> >
>> >foo_bar.
>> >
>> >
>> >I think I should use some kind of 'set' command, but
>> "help set" does not
>> >provide particular info.
>> >
>> >
>> >I know that for titles I should use
>> >
>> >set(title("foo_bar"), "Interpreter", "none");
>> >
>> >, but I do not know what to use for legends.
>> >
>> >Thanks,
>> >  Sergei.
>> 
>> Looks like a bug to me. I can't presently run the
>> developers sources, but I see the same effect in 3.2.
>> 
>> The proper fix would be to properly implement the legend as
>> a separate axes object, and have the text labels inherit
>> their parent's interpreter property.
>> 
>> Until then it would be possible to (1) change the legend
>> interpreter to "none", or (2) have the legend inherit the
>> interpreter of its axes.
>> 
>> For a quick fix, and if you don't mind the console error it
>> produces, you can try the change below
>> 
>>     plot(1:10, 1:10, "-;foo{_}bar;1");
>> 
>> Ben
>> 
>> 
>
>
>Ben,
>
>plot(1:10, 1:10, "-;foo{_}bar;1");
>
>doesn't work, i.e. it produces (octave-3.0.3)
>
>foobar
>
>instead of the expected
>
>foo_bar
>.
>
>Thanks,
>  Sergei.

You are correct. I missed  the "missing" underscore.

Perhaps someone else can provide a solution?

Ben




reply via email to

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