How can I display axis ticks when using fill syntax?
조회 수: 2 (최근 30일)
이전 댓글 표시
Based on Figure 1, the axis ticks (bottom horizontal and right vertical) are hidden when using the fill syntax for my plot. Could you please help me display them again?
Figure 1:

댓글 수: 0
채택된 답변
Star Strider
2023년 11월 16일
편집: Star Strider
2023년 11월 16일
The easiest way is to bring the ticks to the top layer —
x = linspace(0, 1).';
y = x;
figure
fill([x; flip(x)], [zeros(size(y)); flip(y)], 'g')
Ax = gca;
Ax.Layer = 'top';
Ax.Box = 'on';
Another option is to adjust the transparency ('FaceAlpha' value) of the patch.
.
EDIT — (16 Nov 2023 at 02:04)
Corrected typgraphical error.
.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Object Properties에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
