xCD = chromaticDispersion(x, 20, 1550, 30, Tsamp);
-figure(1);
-subplot(211);
+figure(10001);
+subplot(121);
plot(abs(x) .^ 2);
axis([0 30 -Inf Inf]);
title('Before dispersion');
ylabel('Power (arb. unit)');
-subplot(212);
+xlabel('Time (arb. unit)');
+subplot(122);
plot(abs(xCD) .^ 2)
axis([20 50 -Inf Inf]);
title('After dispersion');
-xlabel('Time (arb. unit)');
-ylabel('Power (arb. unit)');
+xlabel('Time (arb.~unit)');
+ylabel('Power (arb.~unit)');
+
+subplot(121);
+formatFigure;
+subplot(122)
+formatFigure;
+set(figure(10001), 'Units', 'centimeters', ...
+ 'Position', [0 0 24 8], 'PaperPositionMode', 'auto');
+subplot(121);
+set(gca, 'XTick', 0:5:30);
+subplot(122);
+set(gca, 'XTick', 20:5:50);
%saveas(gcf, 'dispersionTest.png');