Effacer les filtres
Effacer les filtres

Making xticks match yticks?

2 vues (au cours des 30 derniers jours)
L'O.G.
L'O.G. le 24 Fév 2022
Réponse apportée : Voss le 25 Fév 2022
How can you make the xticks match the yticks without having to manually do something like the following?
xticks([-2*pi -pi 0 pi 2*pi])
yticks([-2*pi -pi 0 pi 2*pi])

Réponse acceptée

Voss
Voss le 25 Fév 2022
You can do this:
set(gca(),'XTick',get(gca(),'YTick'));
For example:
plot(1:10,5:14); % plot a line
set(gca(),'XTick',get(gca(),'YTick')); % make the xticks match the yticks

Plus de réponses (0)

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by