Customizing the axis on a plot - Mainly the tick marks
조회 수: 88 (최근 30일)
이전 댓글 표시
Hi, I am recreating some graphs but I am stuggling with the axis.
This is what I have:
This is what I need:
How would I go about doing this, mainly the different sized tick marks.
Thank You
댓글 수: 0
채택된 답변
Walter Roberson
2022년 8월 11일
ax = gca;
xticks(ax, 0:100:600);
xlim(ax, [0 600])
ax.XMinorTick = 'on';
yticks(0:10:40);
ylim([0 40])
ax.YMinorTick = 'on';
The length of the major ticks can be controlled with the TickLength property.
Note: there is no control over the interval between minor ticks.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!