matlab - Octave contourf how to specify the yticks? -
i have data plot contour. range of y values 0 24, when use command:
axis ([3.12,14.88,0,24]); [cc, hc] = contourf(x,y,z,[-1:0.1:1]);
however, in resulting figure y ranges 0 25:
and values of x , y follows:
x = columns 1 through 17: 3.1200 3.3600 3.6000 3.8400 4.0800 4.3200 4.5600 4.8000 5.0400 5.2800 5.5200 5.7600 6.0000 6.2400 6.4800 6.7200 6.9600 columns 18 through 34: 7.2000 7.4400 7.6800 7.9200 8.1600 8.4000 8.6400 8.8800 9.1200 9.3600 9.6000 9.8400 10.0800 10.3200 10.5600 10.8000 11.0400 columns 35 through 50: 11.2800 11.5200 11.7600 12.0000 12.2400 12.4800 12.7200 12.9600 13.2000 13.4400 13.6800 13.9200 14.1600 14.4000 14.6400 14.8800 y = 0 4 8 12 16 20 24
so problem. need plot of y same yticks above y values.
here's page mathworks discusses customizing tick spacing on axis: http://www.mathworks.com/support/solutions/en/data/1-15hxq/
i'm not sure you're asking, if want tick marks appear on 0,4 ..., 24, following snippet link above should help:
% set xtick integer values range 0.5 - 12.5 used
set(gca,'xtick',[1:12])
Comments
Post a Comment