help-octave
[Top][All Lists]

## Re: revised: How to set xtics in 2-D plot in Octave 3.0.0 on a PC with W

 From: Tatsuro MATSUOKA Subject: Re: revised: How to set xtics in 2-D plot in Octave 3.0.0 on a PC with Windows Vista Date: Thu, 28 Feb 2008 14:09:05 +0900 (JST)

```Please try

xmin=0.0;
xmax=2*pi;
ymin=-1;
ymax=1;
deltax=(xmax-xmin)/200;
axis([xmin   xmax  ymin ymax]);
x=xmin:deltax:xmax;
y=sin(x);
plot(x,y)
ax=gca()
set (ax, "xtick", [pi/4, pi/2, pi, 1.5*pi, 2*pi])
set (ax, "xticklabelmode", "Manual")
set (ax, "xticklabel", ["Pi/4";"Pi/2";"Pi";"3*Pi/2";"Pi"])

I have not been knwon what I should to do.
The trial-and-error method with the octave manual make it possible.

However, the manual is not frindly, I think.

Regards

Tatsuro

--- "Mr. E" <address@hidden> wrote:

> I have been using the __gnuplot_set__ xtics  command
> for a long time to set non-uniform ticks on the x
> axis, particularly handy in marking x-intercepts.
>
> The new version of Octave 3.0.0.0 does not support
> this method.  Does anyone know how to do this?
>
> here is a sample program that I have used for many
> years to teach xtic setting:
>
> xmin=0.0;
> xmax=2*pi;
> ymin=-1;
> ymax=1;
>
> deltax=(xmax-xmin)/200;
>
> axis([xmin   xmax  ymin ymax]);
> x=xmin:deltax:xmax;
> y=sin(x);
> plot(x,y)
> __gnuplot_set__ xtics ( "Pi/4" pi/4, "Pi/2" pi/2, "Pi"
> pi, "3*Pi/2"
> 1.5*pi, "2*Pi" 2*pi )
> plot(x,y)
>
>
> I already tried the suggestion on my PC Windows Vista
> with Octave 3.0.0 installation, and the
>
> set (gca, "xtick", [pi:pi/2:2*pi]);
>
> command does not change the default tickmarks.
>
> I am a teacher at a small college, and it would really
> help my students label their graphs and check handwork
> if I could get the NON-uniform tick setting working
> again.
>
> Any suggestions welcome.
>
> ps.  My question does not appear on the octave help
> page... how can I post this question there for
> everyone to see?
>
> thanks!
> Lalu
>
>
>
,召ア召ア,娼フ召霈&#65533;ｕ&#65533;＆&#65533;♭&#65533;&#65533;娼フ,召ア召ア,娼フ召霈&#65533;ｕ&#65533;
＆&#65533;♭&#65533;&#65533;娼フ,召ア召ア,娼フ召霈&#65533;ｕ&#65533;＆&#65533;♭&#65533;&#65533;娼フ
>
>
> google has good spam filtering!
>
>
>
> ____________________________________________________________________________________
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> _______________________________________________
> Help-octave mailing list