[plotting] irregular subplots and code example

This commit is contained in:
Jan Grewe 2017-11-07 23:21:40 +01:00
parent d7b82e988e
commit 89f4314ec5
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
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')

Binary file not shown.