From: Jose on 17 May 2010 13:44 Hello to everyone, I find a nice way to plot in a table my vectors: x=[0.25 0.5 0.75 1.00] y=[0.25 0.5 0.75 1.00] z= [27 95 74 37; 89 35 55 40; 79 72 30 39; 43 46 41 3] I did it with: h=imagesc(x,y,z)...but my problem is that i need to put tick marks at 0.25 0.5 0.75 and 1, i.e at the middle of every square, because by default it is as: 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1...any help? Thanks in advance.
From: us on 17 May 2010 14:03 "Jose " <jose.l.vega(a)gmail.com> wrote in message <hsrv94$e7m$1(a)fred.mathworks.com>... > Hello to everyone, I find a nice way to plot in a table my vectors: > > x=[0.25 0.5 0.75 1.00] > > y=[0.25 0.5 0.75 1.00] > > z= [27 95 74 37; 89 35 55 40; 79 72 30 39; 43 46 41 3] > > I did it with: > > h=imagesc(x,y,z)...but my problem is that i need to put tick marks at 0.25 0.5 0.75 and 1, i.e at the middle of every square, > because by default it is as: 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1...any help? > > Thanks in advance. one of the solutions % do your IMAGESC(...) set(gca,'xtick',.25:.25:1); % <- same for ytick... us
From: Walter Roberson on 17 May 2010 14:13 Jose wrote: > Hello to everyone, I find a nice way to plot in a table my vectors: > > x=[0.25 0.5 0.75 1.00] > > y=[0.25 0.5 0.75 1.00] > > z= [27 95 74 37; 89 35 55 40; 79 72 30 39; 43 46 41 3] > > I did it with: > > h=imagesc(x,y,z)...but my problem is that i need to put tick marks at > 0.25 0.5 0.75 and 1, i.e at the middle of every square, > because by default it is as: 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 > 1.1...any help? set(ancestor(h,'axis'), 'XTick', x, 'YTick', y]);
|
Pages: 1 Prev: Bar chart with symbols Next: Having control over current directory |