Removing Xaxis and Yaxis values

조회 수: 580 (최근 30일)
Waseem Hussain
Waseem Hussain 2017년 11월 3일
답변: DanielFromIllinois 2025년 3월 11일
Hey I have plotted a graph but I want to remove the values on the axis, I don't want the numbers to show

채택된 답변

Chenchal
Chenchal 2017년 11월 3일
% code
x = rand(1,100);
plot(x);
set(gca,'XTick',[], 'YTick', [])
  댓글 수: 3
Kyril Kaufmann
Kyril Kaufmann 2020년 6월 6일
% gca = ax
set(ax,'xticklabel',[])
Paulo Providencia
Paulo Providencia 2023년 3월 10일
I had to use xticklabels([])

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

추가 답변 (1개)

DanielFromIllinois
DanielFromIllinois 2025년 3월 11일
set(ax,'xticklabel',[])
You can also use set(ax,'XTick',[]) but then you lose the ability to still turn the xgrid on. The grid will draw lines at your ticks specified by 'XTick'.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by