Plot Y axis with 1x unit

6 vues (au cours des 30 derniers jours)
neda fathi
neda fathi le 19 Sep 2022
Commenté : neda fathi le 19 Sep 2022
I have a data include 2 columns in excel. I want to plot the first column against the second column with plot command:
plot(data(:,1), data(:,2));
But the plot devides the Y axis in every 2 units (2x), while I need to show 1x in Y axis. How can I specify the unit for Y axis ?

Réponse acceptée

Walter Roberson
Walter Roberson le 19 Sep 2022
yticks(floor(min(y)):ceil(max(y)))
  1 commentaire
neda fathi
neda fathi le 19 Sep 2022
Great! Many thanks

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

Community Treasure Hunt

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

Start Hunting!

Translated by