XGrid and XTick with different space
이전 댓글 표시
I need draw a fine grid on a figure and keep the XY Ticks as the default one. To get the fine grid, I referred to the idea using a fine ticks. For example:
figure
plot( [-1 1] , [ -1 1] )
set(gca,'Xtick',-1 : 0.02 : 1);
set(gca,'Ytick',-1 : 0.02 : 1);
grid on;
However, I got plenty of ticks which are not required. I try to remove the ticks, and only keep a few of them. But I can only remove them all or not when using the line below:
set(gca,'XTickLabel','','YTickLabel','')
I am trying to keep the ticks shown the way just like generated by the first 2 line codes. Thank you.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Grid Lines, Tick Values, and Labels에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!