figure set(gcf, 'Color', 'white', 'PaperUnit', 'centimeter', 'PaperSize', [12, 8], ... 'PaperPosition', [0, 0, 12, 8]) subplot(2, 2, 1); plot(1); set(gca, 'XTick', [0 1 2], 'XTickLabels', [], 'TickDir', 'out', ... 'TickLength', [0.04, 0.005], 'YTick', [0 1 2], 'LineWidth', 1, ... 'XGrid', 'on', 'YGrid', 'on', 'GridLineStyle', ':') text(0.95, 1, '1', 'FontSize', 14, 'FontWeight', 'bold') subplot(2, 2, 2); plot(1); set(gca, 'XTick', [0 1 2], 'XTickLabels', [], 'TickDir', 'out', ... 'TickLength', [0.04, 0.005], 'YTick', [0 1 2], 'YTickLabels', [], ... 'LineWidth', 1, 'XGrid', 'on', 'YGrid', 'on', 'GridLineStyle', ':',) text(0.95, 1, '2', 'FontSize', 14, 'FontWeight', 'bold') subplot(2, 2, [3, 4]); plot(1); set(gca, 'XTick', [0 1 2], 'XTickLabels', [0 1 2], 'TickDir', 'out', ... 'TickLength', [0.02, 0.005], 'YTick', [0 1 2], 'LineWidth', 1, ... 'XGrid', 'on', 'YGrid', 'on', 'GridLineStyle', ':',) text(0.875, 1, '3 + 4', 'FontSize', 14, 'FontWeight', 'bold') saveas(gcf, 'irregular_subplots', 'pdf')