How do I reset axis ticks to normal after I modify them?
Mostra commenti meno recenti
Suppose I have turned on datetick for a specific axis. Is there a way to turn off / reset the axis ticks to normal mode with 'set' commands?
Risposta accettata
Più risposte (2)
Ivan van der Kroon
il 31 Mag 2011
You can use
set(gca,'XTickLabel',xdate)
where xdate is your x-axis data. With datetick you're just changing the labels, but not the ticks themselves. Hope it helps!
1 Commento
Oleg Komarov
il 31 Mag 2011
set(gca,'xtickl',get(gca,'xtick'))
Martijn Steenwijk
il 31 Mag 2011
0 voti
1 Commento
Oleg Komarov
il 31 Mag 2011
Solutions don't work says nothing about your problem (since both solutions do work if applied coherently) and it's not clear what's your problem.
To see what's the difference with your problem post the formatted code (editing your answer), otherwise no clue.
Categorie
Scopri di più su Grid Lines, Tick Values, and Labels in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!