我正在尝试制作 Matlab,7.10.0.499(R2010a),使用 eps 写出一个图形,print
但无论我将图形设置为何种纸张尺寸,它都会不断裁剪轴标签,除非我将其设为 A3。
这是一个 png 来说明问题(尽管我知道 png 来自不同的渲染管道)。
生成此图的代码是:
figure,
set(gcf, 'renderer', 'painters');
loglog(p_m_tt, p_fa_tt, 'k-', 'LineWidth', 2); hold on;
loglog(p_m_oo, p_fa_oo, 'k--', 'LineWidth', 2); hold on;
loglog(p_m_ot, p_fa_ot, 'k-.', 'LineWidth', 3); hold on;
fontSize = 9;
l = legend('Cam1-Cam1', 'Cam2-Cam2', 'Cam2-Cam1', ...
'Location', 'NorthEast');
fontSize = 20;
xlabel('$P_{fa}$', 'fontsize', fontSize);
ylabel('$P_{m}$', 'fontsize', fontSize);
set(gca, 'XMinorTick', 'off', 'YMinorTick', 'off', 'YGrid', 'on', 'XGrid', 'on');
set(gcf, 'PaperPositionMode', 'auto');
set(gca, 'XTick', [0.00001 0.0001 0.001 0.01 0.1 1]);
set(gca, 'MinorGridLineStyle', 'none');
set(gca, 'FontSize', fontSize);
set(gcf, 'defaultAxesFontName', 'Times New Roman');
axis square;
X = 13;
Y = 13;
xMargin = 0.25; %# left/right margins from page borders
yMargin = 0.25; %# bottom/top margins from page borders
xSize = X - 2*xMargin; %# figure size on paper (widht & height)
ySize = Y - 2*yMargin;
set(gcf, 'PaperUnits', 'centimeters');
set(gcf, 'PaperSize', [X Y]);
set(gcf, 'PaperPosition', [0 0 xSize ySize]);
print('-depsc2', f);