Removing Xaxis and Yaxis values

633 visualizzazioni (ultimi 30 giorni)
Waseem Hussain
Waseem Hussain il 3 Nov 2017
Risposto: DanielFromIllinois il 11 Mar 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

Risposta accettata

Chenchal
Chenchal il 3 Nov 2017
% code
x = rand(1,100);
plot(x);
set(gca,'XTick',[], 'YTick', [])
  3 Commenti
Kyril Kaufmann
Kyril Kaufmann il 6 Giu 2020
% gca = ax
set(ax,'xticklabel',[])
Paulo Providencia
Paulo Providencia il 10 Mar 2023
I had to use xticklabels([])

Accedi per commentare.

Più risposte (1)

DanielFromIllinois
DanielFromIllinois il 11 Mar 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'.

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by