python保存图片到adobe illustrator中

python保存图片到adobe illustrator中

# 保存图片的code  svg 有点小bug,ai中没有识别到坐标轴(网格)
savePath = r'a'
fig, ax = plt.subplots()
sns.lineplot(data=df, x="x", y="y")
plt.savefig(r"{}/lightTrace.svg".format(savePath), format="svg", transparent=True)
print("finished")

# 保存图片的code  pdf没有报错,但是结果基本上一样
savePath = r'a'
fig, ax = plt.subplots()
sns.lineplot(data=df, x="x", y="y")
plt.savefig(r"{}/lightTrace.pdf".format(savePath), format="pdf", transparent=True)
print("finished")
posted @ 2022-06-11 22:57  bH1pJ  阅读(36)  评论(0编辑  收藏  举报