【发布时间】:2012-05-24 22:23:16
【问题描述】:
我使用 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是如何计算这个位置的吗?
【问题讨论】:
-
我不确定我是否理解问题,但这些相关答案可能会有所帮助:How to set the plot in matlab to a specific size? 或 Printing a MATLAB plot in exact dimensions on paper