t = linspace(0,2*pi,100) ;
y = sin(t) ;
plot(t,y,'bo-') ;
set(gca,'xtick',[0:pi:2*pi]) % where to set the tick marks
set(gca,'xticklabels',{'0','\pi','2\pi'}) % give them user-defined labels
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!