4 Subplots Configuration Code

Hi, How can I create the following figure?? In the end I want to save it with the saveas function.
X1 =
1 2 3 4 5 6
Y1 =
26.0902 42.9149 43.8763 94.0833 14.7254 54.5473
Y2 =
115.9783 60.0937 139.7268 109.1997 108.5510 116.0662
Y3 =
1.0e+03 *
1.8353 1.7153 2.0605 1.8815 1.6531 1.3510
Y4 =
0.8446 0.7564 0.7606 1.0158 0.7379 1.1439
figure
subplot(2,2,1)
plot(X1,Y1)
title('Gráfico 1 - HSD')
subplot(2,2,2)
plot(X1,Y2)
title('Gráfico 2 - HI')
subplot(2,2,3)
plot(X1,Y3)
title('Gráfico 3 - TD')
subplot(2,2,4)
plot(X1,Y4)
title('Gráfico 4 - W/R Ratio')

 Accepted Answer

saveas(gcf,'myplot.jpg')

1 Comment

thank you. now i just need the right code to configure the subplots.

Sign in to comment.

More Answers (1)

Community Treasure Hunt

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

Start Hunting!