Effacer les filtres
Effacer les filtres

How to shift the y-axis and force it to start at another number rather than 0?

16 vues (au cours des 30 derniers jours)
Dear all,
I have this:
But I need to see what is the plot if the horizontal axes cross value is -3 like this (with same as above data):
How I can do this?
Thank you
  2 commentaires
KSSV
KSSV le 16 Nov 2020
Ass -3 to the data and plot.
BN
BN le 16 Nov 2020
Hello, What do you mean? I don't understand your comment :(

Connectez-vous pour commenter.

Réponse acceptée

Ameer Hamza
Ameer Hamza le 16 Nov 2020
You can change the yticklabels() to show the values you want. For example
rng(0);
lower_value = -3;
x = randn(1, 10);
y = x - lower_value;
bh = bar(y);
yticklabels(string(yticks+lower_value))

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

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by