Removing Xaxis and Yaxis values

728 Ansichten (letzte 30 Tage)
Waseem Hussain
Waseem Hussain am 3 Nov. 2017
Beantwortet: DanielFromIllinois am 11 Mär. 2025
Hey I have plotted a graph but I want to remove the values on the axis, I don't want the numbers to show

Akzeptierte Antwort

Chenchal
Chenchal am 3 Nov. 2017
% code
x = rand(1,100);
plot(x);
set(gca,'XTick',[], 'YTick', [])
  3 Kommentare
Kyril Kaufmann
Kyril Kaufmann am 6 Jun. 2020
% gca = ax
set(ax,'xticklabel',[])
Paulo Providencia
Paulo Providencia am 10 Mär. 2023
I had to use xticklabels([])

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

DanielFromIllinois
DanielFromIllinois am 11 Mär. 2025
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'.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by