command for which the label on the x axis is not shown
Afficher commentaires plus anciens
Hi,
I am looking for a command so that there are no values on the x axis shown.
I tried this;
set(gca,'xtick',[])
but it's not working, any idea
1 commentaire
per isakson
le 18 Mai 2013
Any warning or error message?
Réponse acceptée
Plus de réponses (2)
Image Analyst
le 18 Mai 2013
Like I said in your duplicate question:
plot(1:10); % Plot some arbitrary sample data.
set(gca, 'xtick', [-inf inf]); % Turn off x-axis.

3 commentaires
Locks
le 18 Mai 2013
Image Analyst
le 18 Mai 2013
Explain why it does not work. It plots something in an axes control "where there are no value displayed on the x axis" just like you asked for.
Give me something we can run:
Undefined variable dataSet.
Error in test3 (line 1)
dates=datenum(dataSet(:,1));
Walter Roberson
le 18 Mai 2013
What you are missing is that you used plotyy() without mentioning it to us. plotyy() generates two axes, and makes no promises about what gca() will refer to afterwards. You need to save the output of the plotyy() call and use the appropriate axes from what is returned.
Catégories
En savoir plus sur Two y-axis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!