Removing Xaxis and Yaxis values

693 次查看(过去 30 天)
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', [])

更多回答(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