[plotting] irregular subplots and code example
This commit is contained in:
parent
d7b82e988e
commit
89f4314ec5
26
plotting/code/irregular_subplot.m
Normal file
26
plotting/code/irregular_subplot.m
Normal 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')
|
BIN
plotting/lecture/images/irregular_subplots.pdf
Normal file
BIN
plotting/lecture/images/irregular_subplots.pdf
Normal file
Binary file not shown.
Reference in New Issue
Block a user