我使用Matlab生成PDF文件中的图表。这些PDF文件中的图表应该具有正确的大小,因此我使用PaperSize。然后,我必须使用正确的PaperPosition定位图表。问题在于Matlab使用某些奇怪的方程来计算图表在页面上的位置。因此,图表定位是通过参数不断试错而不是计算得出的。例如:
set(gcf, 'PaperPosition', [-0.3 -0 7.2 3.1]); %Position the plot further to the left and down. Extend the plot to fill entire paper.[left bottom width height]
set(gcf, 'PaperSize', [6.5 3]); %Keep the paper size [width height]
您知道Matlab是如何计算这个位置的吗?