栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

Python绘制的图,能被放到adobe illustrator吗?

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Python绘制的图,能被放到adobe illustrator吗?

坑。

可以的;

1、which file type that Python out and adobe illustrator can feed

2、matplot output adobe illustrator file

或许pdf是关键:

Exporting from matplotlib to open in Adobe Illustrator

3、这是一个demo可以尝试一下:

python - How can I export a matplotlib figure as a vector graphic with editable ROTATE text annotation? - Stack Overflow

非常好,eps文件确实可以在adobe中进行编辑;

都可以进行编辑

code如下:

import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.patheffects as pe


mpl.rcParams['pdf.fonttype'] = 42
mpl.rcParams['ps.fonttype'] = 42
mpl.rcParams['svg.fonttype'] = 'none'

x=[0,0,1, 2,  3, 4, 5, 6, 7, 8, 9, 10,11,12,13,13]
y=[0,4,1, 8, 12, 6, 7, 4, 4, 1, 8, 12, 6, 7, 4, 0]

plt.xlim(right=max(x)) #xmax is your value
plt.xlim(left=0) #xmin is your value
plt.ylim(top=max(y)) #ymax is your value
plt.ylim(bottom=0) #ymin is your value

plt.plot(x,y)
plt.text(0.5, 12, 'Rotate text', va='top',ha='right', rotation=90,zorder=20, wrap=True,size=10,color='g',path_effects=[pe.withStroke(linewidth=5, foreground='w')])

plt.savefig("test.eps")

plt.savefig('test.pdf')

plt.savefig('test.svg')


plt.show()

plt.clf()

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/767172.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号