Python目前可以生成的图的格式是:eps, jpeg, jpg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
在写论文时候我一般生成png,结果发现打印成PDF文件的时候非常模糊,其他的格式也基本试了下(我真闲),发现效果有差不多,最后网上找教程发现svg转成矢量图emf打印成PDF效果会比较好。
转换过程中由于自己电脑没有装ps,所以格式转换很麻烦,最后找到INKSCAPE(点击即可下载)这个软件可以很好的转换成矢量图。
看看对比效果:
但是,白边过大的问题也很严峻啊。因为Python生成的原始图是svg,带白边的,这个不知道怎么把它裁剪为不带白边的。
本打算用Python代码在生成的过程中去掉的,结果出来的效果不尽人意,破坏了图的协调感。
遂打算找个软件裁剪算了。
最后发现用INKSCAPE这个软件可以剪切,他不是说直接剪切,而是选中你的图(注意,这里好像是只要带框的都可以选中哦,很厉害的)拉倒画布大小,拉倒画布大小就相当于图没有margin了,等同于裁剪了。具体过程如下:
突然发现步骤记录器的文件不能传上来,扎心了。
总之就是多用鼠标左键会给你惊喜的。
Recorded Steps
This file contains all the steps and information that was recorded to help
you describe the recorded steps to others.
Before sharing this file, you should verify the following:
- The steps below accurately describe the recording.
- There is no information below or on any screenshots that you do not want
others to see.
Passwords or any other text you typed were not recorded, except for function
and shortcut keys that you used.
You can do the following:
Steps
Step 2: (2018/11/12 20:39:10) 用户在"新建文档 1 - Inkscape
(窗口)"上左键单击(在"新建文"中)
对于此步骤,没有保存任何屏幕截图。
Step 4: (2018/11/12 20:39:18) 用户在"internet traffic
(列表项目)"上左键单击(在"选择要"中)
对于此步骤,没有保存任何屏幕截图。
Step 6: (2018/11/12 20:39:45) 用户在"internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
Step 8: (2018/11/12 20:40:24) 用户在"internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
Step 9: (2018/11/12 20:40:25) 用户在"internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
Step 10: (2018/11/12 20:40:26) 用户在"internet traffic.svg - Inkscape
(窗口)"上左键双击(在"int"中)
Step 11: (2018/11/12 20:40:28) 用户在"internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
Step 12: (2018/11/12 20:40:28) 用户在"internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
Step 13: (2018/11/12 20:40:30) 用户在"internet traffic.svg - Inkscape
(窗口)"上左键双击(在"int"中)
Step 14: (2018/11/12 20:40:32) 用户在"internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
Step 15: (2018/11/12 20:40:32) 用户在"internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
Step 16: (2018/11/12 20:40:32) 用户在"internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
Step 18: (2018/11/12 20:41:32) 用户在"internet traffic.svg - Inkscape
(窗口)"上鼠标拖动开始(在"int"中)
Step 19: (2018/11/12 20:41:38) 用户在"internet traffic.svg - Inkscape
(窗口)"上鼠标拖动结束(在"int"中)
Step 20: (2018/11/12 20:41:38) 用户在"*internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
Step 21: (2018/11/12 20:41:39) 用户在"*internet traffic.svg - Inkscape
(窗口)"上左键单击(在"*in"中)
Step 22: (2018/11/12 20:41:47) 用户在"*internet traffic.svg - Inkscape
(窗口)"上鼠标拖动开始(在"*in"中)
Step 23: (2018/11/12 20:41:55) 用户在"*internet traffic.svg - Inkscape
(窗口)"上鼠标拖动结束(在"*in"中)
Step 24: (2018/11/12 20:41:58) 用户在"*internet traffic.svg - Inkscape
(窗口)"上鼠标拖动开始(在"*in"中)
Step 25: (2018/11/12 20:41:59) 用户在"*internet traffic.svg - Inkscape
(窗口)"上鼠标拖动结束(在"*in"中)
Step 26: (2018/11/12 20:42:15) 用户在"*internet traffic.svg - Inkscape
(窗口)"上左键单击(在"*in"中)
Additional Details
The following section contains the additional details that were recorded.
These details help accurately identify the programs and UI you used in this
recording.
This section may contain text that is internal to programs that only very
advanced users or programmers may understand.
Please review these details to ensure that they do not contain any
information that you would not like others to see.
记录会话: 2018/11/12 20:38:58 - 20:42:56
记录的步骤: 31, 丢失的步骤: 0, 其他错误:
0
操作系统: 17134.1.amd64fre.rs4_release.180410-1804 10.0.0.0.2.121
步骤
1: 用户在"Inkscape (按钮)"上左键单击
程序: Windows 资源管理器, 10.0.17134.400
(WinBuild.160101.0800), Microsoft Corporation, EXPLORER.EXE,
EXPLORER.EXE
用户界面元素: Inkscape, 运行中的应用程序, MSTaskListWClass, 运行中的应用程序,
MSTaskSwWClass, ReBarWindow32, 任务栏, Shell_TrayWnd
步骤 2: 用户在"新建文档 1 -
Inkscape (窗口)"上左键单击(在"新建文"中)
程序: Inkscape vector graphics editor, 0.92.3,
Inkscape project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: 新建文档 1 - Inkscape,
gdkWindowToplevel
步骤 3: 用户在"inkscape.exe (窗格)"上左键单击(在"ink"中)
程序:
Inkscape vector graphics editor, 0.92.3, Inkscape project, INKSCAPE.EXE,
INKSCAPE.EXE
用户界面元素: inkscape.exe, gdkWindowTempShadow, 新建文档 1 - Inkscape,
gdkWindowToplevel
步骤 4: 用户在"internet traffic (列表项目)"上左键单击(在"选择要"中)
程序:
Inkscape vector graphics editor, 0.92.3, Inkscape project, INKSCAPE.EXE,
INKSCAPE.EXE
用户界面元素: internet traffic, 文件夹视图, SysListView32,
SHELLDLL_DefView, 选择要打开的文件, #32770, 新建文档 1 - Inkscape,
gdkWindowToplevel
步骤 5: 用户在"打开(O) (按钮)"上左键单击(在"选择要"中)
程序: Inkscape
vector graphics editor, 0.92.3, Inkscape project, INKSCAPE.EXE,
INKSCAPE.EXE
用户界面元素: 打开(O), Button, 选择要打开的文件, #32770, 新建文档 1 - Inkscape,
gdkWindowToplevel
步骤 6: 用户在"internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 7: 用户注释: "注意:四周黑丝的箭头在现在这个地方"
程序:
用户界面元素:
步骤 8: 用户在"internet traffic.svg - Inkscape (窗口)"上左键单击(在"int"中)
程序:
Inkscape vector graphics editor, 0.92.3, Inkscape project, INKSCAPE.EXE,
INKSCAPE.EXE
用户界面元素: internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 9: 用户在"internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 10: 用户在"internet traffic.svg - Inkscape
(窗口)"上左键双击(在"int"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 11: 用户在"internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 12: 用户在"internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 13: 用户在"internet traffic.svg - Inkscape
(窗口)"上左键双击(在"int"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 14: 用户在"internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 15: 用户在"internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 16: 用户在"internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 17: 用户注释: "然后往你选择的地方多点击几次,发现选中了你要更改的区域,"
程序:
用户界面元素:
步骤 18: 用户在"internet traffic.svg - Inkscape
(窗口)"上鼠标拖动开始(在"int"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 19: 用户在"internet traffic.svg - Inkscape
(窗口)"上鼠标拖动结束(在"int"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 20: 用户在"*internet traffic.svg - Inkscape
(窗口)"上左键单击(在"int"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: *internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 21: 用户在"*internet traffic.svg - Inkscape
(窗口)"上左键单击(在"*in"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: *internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 22: 用户在"*internet traffic.svg - Inkscape
(窗口)"上鼠标拖动开始(在"*in"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: *internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 23: 用户在"*internet traffic.svg - Inkscape
(窗口)"上鼠标拖动结束(在"*in"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: *internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 24: 用户在"*internet traffic.svg - Inkscape
(窗口)"上鼠标拖动开始(在"*in"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: *internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 25: 用户在"*internet traffic.svg - Inkscape
(窗口)"上鼠标拖动结束(在"*in"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: *internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 26: 用户在"*internet traffic.svg - Inkscape
(窗口)"上左键单击(在"*in"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: *internet traffic.svg - Inkscape,
gdkWindowToplevel
步骤 27: 用户在"inkscape.exe (窗格)"上左键单击(在"ink"中)
程序:
Inkscape vector graphics editor, 0.92.3, Inkscape project, INKSCAPE.EXE,
INKSCAPE.EXE
用户界面元素: inkscape.exe, gdkWindowTempShadow, *internet traffic.svg
- Inkscape, gdkWindowToplevel
步骤 28: 用户在"保存类型(T):
(组合框)"上左键单击(在"选择要"中)
程序: Inkscape vector graphics editor, 0.92.3, Inkscape
project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: 保存类型(T):, ComboBox, 选择要保存的文件,
#32770, *internet traffic.svg - Inkscape, gdkWindowToplevel
步骤 29:
用户在"增强型图元文件 (*.emf) (列表项目)"上左键单击
程序: Inkscape vector graphics editor, 0.92.3,
Inkscape project, INKSCAPE.EXE, INKSCAPE.EXE
用户界面元素: 增强型图元文件 (*.emf),
保存类型(T):, ComboLBox, 保存类型(T):, ComboBox, 选择要保存的文件, #32770, *internet traffic.svg
- Inkscape, gdkWindowToplevel
步骤 30: 用户在"保存(S) (按钮)"上左键单击(在"选择要"中)
程序:
Inkscape vector graphics editor, 0.92.3, Inkscape project, INKSCAPE.EXE,
INKSCAPE.EXE
用户界面元素: 保存(S), Button, 选择要保存的文件, #32770, *internet traffic.svg -
Inkscape, gdkWindowToplevel
步骤 31: 用户在"EMF 输出 (窗口)"上左键单击(在"EMF"中)
程序:
Inkscape vector graphics editor, 0.92.3, Inkscape project, INKSCAPE.EXE,
INKSCAPE.EXE
用户界面元素: EMF 输出, gdkWindowToplevel, *internet traffic.svg -
Inkscape, gdkWindowToplevel
Return to top of page...