|
"Grzegorz " <gknor@o2.pl> wrote in message <i4m91l$jab$1@fred.mathworks.com>...
> "Camille Couzi" <camillecouzi@yahoo.fr> wrote in message <i4m5ji$30r$1@fred.mathworks.com>...
> > Hi,
> > I have a little problem with the use of XData. I am plotting and imagesc, for example for the matrix:
> > A=[ 5 6 4 8; 8 12 23 31;15 9 27 5];
> >
> > The default Xdata scaling would be: 0.5 1 1.5 2 2.5 3 3.5 4 4.5
> > (as size(A,1)=4
> >
> > If I want to have (for example): 3 6 9 12, (only in with tick in the center of the squares, ie avoid the intermediate ticks and labels) how can I do?
> >
> > I tried with:
> > x=[3 12];
> > imagesc(matriz,'XData',x)
> >
> > but that doesn't work well, the ticks are not placed where I want.
> > Please, any help will be very appreciated!
>
> I think that this code is the solution of your problem:
> A=[ 5 6 4 8; 8 12 23 31;15 9 27 5];
> x = 3:3:12
> y = 1:3
> imagesc(x,y,A)
Hi Grzegorz,
Thanks for the reply, but it gives the same result as my example...: the axis is in fact scaled from 3 to 12, but it gives ticks for 2 4 6 8 10 12...
I need only ticks in the center of the squares, ie here 3 6 9 12, I don't want to see other ticks and labels... that make sense?
Thank you a lot
Camille.
|