From: niko rose on
Hello,
Does anyone know how I can set axis limits on a compass plot?
Usually, using regular plot, you have the 'xlim' and 'ylim' options but there is nothing of that sort in compass plot.
Perhaps there is a way to get access to the axis and set their limits?
Thank you
From: Wayne King on
"niko rose" <mymatlab101(a)gmail.com> wrote in message <hoaebv$90u$1(a)fred.mathworks.com>...
> Hello,
> Does anyone know how I can set axis limits on a compass plot?
> Usually, using regular plot, you have the 'xlim' and 'ylim' options but there is nothing of that sort in compass plot.
> Perhaps there is a way to get access to the axis and set their limits?
> Thank you

Hi Niko,

you can use gca

compass(randn(10,1),randn(10,1))
H=gca;
% to view properties you can use get(H)
set(H,'ylim',[0 2.5])

Hope that helps,
Wayne
From: niko rose on
"Wayne King" <wmkingty(a)gmail.com> wrote in message <hoafdp$qtd$1(a)fred.mathworks.com>...
> "niko rose" <mymatlab101(a)gmail.com> wrote in message <hoaebv$90u$1(a)fred.mathworks.com>...
> > Hello,
> > Does anyone know how I can set axis limits on a compass plot?
> > Usually, using regular plot, you have the 'xlim' and 'ylim' options but there is nothing of that sort in compass plot.
> > Perhaps there is a way to get access to the axis and set their limits?
> > Thank you
>
> Hi Niko,
>
> you can use gca
>
> compass(randn(10,1),randn(10,1))
> H=gca;
> % to view properties you can use get(H)
> set(H,'ylim',[0 2.5])
>
> Hope that helps,
> Wayne


Hi Wayne,
The problem is different. the y-axis is too short. That is, the values on the polar plots go for example until 90 but for some reason it is cut at the 80th value. As a result, the arrows extend beyond the limits of the circle whereas I would like all arrows to be within the borders of the compass plot.
Thank you.