Removing Xaxis and Yaxis values

624 vues (au cours des 30 derniers jours)
Waseem Hussain
Waseem Hussain le 3 Nov 2017
Hey I have plotted a graph but I want to remove the values on the axis, I don't want the numbers to show

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (1)

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

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by