Can't set xticklabel

Ben Abbott bpabbott at mac.com
Wed Jul 29 18:08:20 CDT 2009


On Jul 29, 2009, at 4:15 PM, Antoni Aduszkiewicz wrote:

> Bug report for Octave 3.2.0 configured for i686-pc-linux-gnu
>
> Description:
> -----------
> % The following short example script
>
> x = 0:0.1:10;
> y = sin(x);
>
> xtick = 0:pi:10;
> xticklabel = [" 0 "; " pi"; "2pi"; "3pi"];
>
> plot(x,y)
> set(gca, "xtick",xtick, "xticklabel", xticklabel);
>
> %END

There are several quick fixes. One is

	set (gca, "xtick", xtick, "xticklabel", "0|pi|2pi|3pi")

Another that will use the Greek version is ...

	set (gca, "xtick", xtick, "xticklabel", "0|\\pi|2\\pi|3\\pi")

In any event, I'll take a look at a changeset.

Ben



More information about the Bug-octave mailing list