本文介绍了MATLAB:将图形打印为pdf,如MATLAB中所示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将图形导出(另存为,打印)为.pdf格式.但是,无论我如何配置设置,该图周围都有很大的空白.

I am trying to export (save as, print) a figure into .pdf format. However, no matter how I configure the setting, there are large margins around the figure.

当我将图形导出为.eps格式时,没有这样的问题---即图形看起来就像在MATLAB中显示一样.

When I export the figure into .eps format, there is no such problem --- i.e. the figure just looks like it is displayed in the MATLAB.

如何将图形导出为.pdf格式,看起来与MATLAB中显示的格式相同?

How could I export the figure into .pdf format, which looks the same as it is shown in the MATLAB?

推荐答案

您可以尝试以下操作:

1)在 MATLAB 中绘制图形后,转到文件"->导出设置" ',然后输入所需输出的大小.例如,宽度:6英寸,高度:5英寸.然后单击应用于图"按钮.

1) After you plot the figure in MATLAB, go to 'File->Export Setup', and input the size of the output you want. For example, Width: 6 inches, Height: 5 inches. Then click 'Apply to Figure' button.

2)不要关闭导出设置"窗口.转到文件"->打印预览"->纸张",在宽度"和高度"选项中输入相同的大小.

2) Don't close the 'Export Setup' window. Go to 'File->Print Preview->Paper', input the same size in the Width and Height options.

3)不要关闭打印预览"窗口.返回导出设置"窗口,然后单击导出",然后选择pdf格式并保存.

3) Don't close the 'Print Preview' window. Go back to the 'Export Setup' window, and click 'Export', then select pdf format and save it.

4)检查输出的PDF文件,您会发现它是完美的.

4) Check the output PDF file, you'll see it is perfect.

我在博客文章 在MATLAB中将图形导出为PDF .

I found the solution in blog post Export figure to PDF in MATLAB.

这篇关于MATLAB:将图形打印为pdf,如MATLAB中所示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 09:15