How can I change the number of MinorTicks between MajorTicks?
7 次查看(过去 30 天)
显示 更早的评论
Hello, I use the code below to plot some results. The results are given between June 2012 and September 2015. I would like to put the MajorTicks every three months and the MinorTicks each month that has no label. How could I change the number of MinorTicks?
if true
startDate=datenum('06-01-2012');
endDate=datenum('09-31-2015');
xData=linspace(startDate,endDate,16);
set(gca,'XMinorTick','on','XTick',xData)
datetick('x','mmm/yy','keepticks')
end
0 个评论
回答(1 个)
Kirby Fears
2016-10-24
编辑:Kirby Fears
2016-10-24
Hi Geovana,
I think your questions is answered here: https://www.mathworks.com/matlabcentral/answers/102945-how-can-i-specify-the-spacing-between-minor-tick-marks-and-minor-grid-lines-in-my-figures-in-matlab
Hope this helps.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Platform and License 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!