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命令