gnuplot 生成的eps图太大了。
原因是EPS中有很多重复的数据点。
解决方式是去除重复点。
下面的python程序可以解决之。
#! /usr/bin/env python
#encoding: utf-8
import sys
import os
def reduce(fi,fo):
fr,fw=open(fi), open(fo,'w')
ll=None
for l in fr:
if l!=ll:
fw.write(l)
ll=l
fr.close()
fw.close()
if __name__=='__main__':
if len(sys.argv)<2:
print 'Usage: reduceEPS.py XXXX.eps'
sys.exit(-1)
fi=sys.argv[1]
pre, ext=os.path.splitext(fi)
fo=pre+'.reduced'+ext
reduce(fi, fo)
=====================================
其实可以直接使用uniq命令
最后
以上就是彩色眼神最近收集整理的关于Size of EPS generated by Gnuplot is too large的全部内容,更多相关Size内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复