How to turn off X axis while keeping the X axis grid lines?

조회 수: 36 (최근 30일)
Athul C P
Athul C P 2021년 11월 5일
댓글: Athul C P 2021년 11월 6일
The x axis is turning off while using 'XTick', [ ] and gridlines are also removing(vertical lines). But I need to keep the grid lines and remove xaxis from the figure.
set(gca,'XTick',[],'fontweight' , 'bold','fontsize',12); xlim([0 122]); grid on ;

채택된 답변

Sudharsana Iyengar
Sudharsana Iyengar 2021년 11월 5일
Hi
Please try this and see if this is what you wanted.
grid on
set(gca,'Xticklabel',{})

추가 답변 (1개)

Sudharsana Iyengar
Sudharsana Iyengar 2021년 11월 5일
grid on
set(gca,'Xtick',[],'Ytick',[])
  댓글 수: 1
Athul C P
Athul C P 2021년 11월 5일
This is also not working. I added one figure I think by looking that you might be getting the actual problem.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by