Effacer les filtres
Effacer les filtres

Customizing the axis on a plot - Mainly the tick marks

51 vues (au cours des 30 derniers jours)
Alice K
Alice K le 11 Août 2022
Modifié(e) : Alice K le 11 Août 2022
Hi, I am recreating some graphs but I am stuggling with the axis.
This is what I have:
This is what I need:
How would I go about doing this, mainly the different sized tick marks.
Thank You

Réponse acceptée

Walter Roberson
Walter Roberson le 11 Août 2022
ax = gca;
xticks(ax, 0:100:600);
xlim(ax, [0 600])
ax.XMinorTick = 'on';
yticks(0:10:40);
ylim([0 40])
ax.YMinorTick = 'on';
The length of the major ticks can be controlled with the TickLength property.
Note: there is no control over the interval between minor ticks.
  1 commentaire
Alice K
Alice K le 11 Août 2022
Modifié(e) : Alice K le 11 Août 2022
Thank You! It works

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Tags

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by