X Tick Labels skipping certain values

4 vues (au cours des 30 derniers jours)
KK JJ
KK JJ le 1 Mai 2018
Hi,
I have a semilogx in which x-axis ranges from 10^3 to 10^10; I'd like to see x-tick label for all decades (10^3, 10^4, 10^5 .... 10^10), however, it only shows 10^4, 10^6, 10^8 and 10^10; while enlarging the figure solved the problem, I hope to see all labels in original figure.
Is there a way to set it?
thanks,
Kev

Réponse acceptée

Ameer Hamza
Ameer Hamza le 1 Mai 2018
Use XTick property of axes object to define where you want to place ticks. Run the following
ax = gca;
ax.XTick = logspace(3, 10, 8);
It will display all the required ticks.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by