Matplotlib:eps-plots质量下降

时间:2014-04-07 14:22:45

标签: python matplotlib plot

我有以下图表,我用matplotlib以两种不同格式制作:pngeps enter image description here (左:EPS。右:PNG)

在图中我使用annotate (with alpha=0.3), fill (with alpha=0.3), plot and savefig("s.eps")

之类的命令

有人可以解释eps文件中这种严重的质量损失吗? (乳胶需要这个文件)

这里再次是eps文件(放大): enter image description here

1 个答案:

答案 0 :(得分:0)

我找到了解决方案here

它首先基于栅格化图像而不是将其保存为eps-figure。

ax.set_rasterization_zorder(1) 

另一种选择是将图表保存为pdf而不是将其转换为eps。 (pdftoeps -eps)。但我发现第一个解决方案产生了更好的结果。