无法编辑由Matplotlib导出并在Illustrator中打开的图表中的文本 [英] Cannot edit text in chart exported by Matplotlib and opened in Illustrator

查看:367
本文介绍了无法编辑由Matplotlib导出并在Illustrator中打开的图表中的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从matplotlib中导出图表,并在Illustrator中对其进行编辑.我可以编辑线条很棒,但是文本也以线条形式出现,所以我不能更改字体,编辑文本等.我​​已经导出为EPS,PDF和PS,但存在相同的问题.

I am exporting charts from matplotlib and editing them in Illustrator. It's great that I can edit the lines, but the text also comes in as lines, so I cannot change fonts, edit text, etc. I've exported as EPS, PDF, and PS with the same issues.

我正在OSX Snow Leaopard上使用带有Python 2.7.1的matplotlib版本1.0.1.

I'm using matplotlib version 1.0.1 with python 2.7.1 on OSX Snow Leaopard.

我感谢您提供的任何见解!我尝试按照建议此处 a>,但所做的一切只是降低了图像质量,而没有使文本呈现为真实文本. pdftops看起来更好,但仍然无法编辑文本结果.

I appreciate any insights offered! I tried using pdf2ps as suggested here, but all that did was degrade the quality of the image without making the text rendered as real text. pdftops looked nicer, but still can't edit the text results.

推荐答案

如果将pdf.fonttype设置为42(TrueType),则可以在Acrobat/Illustrator中编辑文本,并以pdf格式导出.您可以在~/matplotlib/matplotlibrc:

You can edit the text in Acrobat/Illustrator if you set pdf.fonttype to 42 (TrueType), and export in pdf. You can set this in your ~/matplotlib/matplotlibrc:

pdf.fonttype : 42 # Output Type 3 (Type3) or Type 42 (TrueType)

..或动态:

>>> import matplotlib as mpl
>>> mpl.rcParams['pdf.fonttype'] = 42

显然,它默认为Acrobat/Illustrator无法处理的Type3.

Apparently it defaults to Type3 which Acrobat/Illustrator can't deal with.

这篇关于无法编辑由Matplotlib导出并在Illustrator中打开的图表中的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆