Borrar filtros
Borrar filtros

Re scaling the axis of a figure

1 visualización (últimos 30 días)
MINA
MINA el 16 de Mayo de 2016
Comentada: MINA el 16 de Mayo de 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

Respuesta aceptada

Jan
Jan el 16 de Mayo de 2016
Editada: Jan el 16 de Mayo de 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));

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by