Removing Xaxis and Yaxis values

624 ビュー (過去 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 Center および File Exchange2-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