Removing Xaxis and Yaxis values

Hey I have plotted a graph but I want to remove the values on the axis, I don't want the numbers to show

 采纳的回答

% code
x = rand(1,100);
plot(x);
set(gca,'XTick',[], 'YTick', [])

3 个评论

but I dont want to erase the grid as well... how to just hide the values??
I had to use xticklabels([])

请先登录,再进行评论。

更多回答(1 个)

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'.

类别

在 帮助中心 和 File Exchange 中查找有关 Data Exploration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by