Effacer les filtres
Effacer les filtres

Re scaling the axis of a figure

1 vue (au cours des 30 derniers jours)
MINA
MINA le 16 Mai 2016
Commenté : MINA le 16 Mai 2016
Hello,
I have two subplots which need to have the same X scale but when I plot them they are different. I have attached my figure. Could someone please tell me how can I expand the x axis of the top one! Thanks

Réponse acceptée

Jan
Jan le 16 Mai 2016
Modifié(e) : Jan le 16 Mai 2016
The problem is caused by automatic placement of the color bar. Set the location manually to avoid a rescaling:
subplot(2,1,1);
plot(rand(1,10));
colorbar('Position', [0.93, 0.584, 0.015, 0.341]);
subplot(2,1,2);
plot(rand(1,10));
  1 commentaire
MINA
MINA le 16 Mai 2016
Thanks. It worked now.

Connectez-vous pour commenter.

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