在使用mummerplot时, 无法输出png格式结果.
$ python PlotSccDistr.py
set terminal png size 1000,800
^
"scc.example.plt", line 16: unknown or ambiguous terminal type; type just 'set terminal' for a list
因为缺少gnuplot中对png结果的输出.
$ gnuplot
$ gnuplot> set terminal
# 缺少png, jpeg和gif
在本人尝试过多次后, 总结出解决方法, 如下:
1) 下载安装libpng, libjpeg和zlib(不确定是否一定需要)
libpng: http://www.libpng.org/pub/png/libpng.html
libjpeg: libjpeg
zlib: zlib Home Site
下载.tar.gz文件后, 用source code 安装
$ tar zxvf [package].tar.gz
$ cd [package]
$ ./configure --prefix=/home/[username]/[package_location]
$ make
$ make check
$ make install
2) 下载安装libgd2
libgd2:libgd2 install
下载.tar.gz文件后, 用source code 安装
$ tar zxvf libgd-2.3.1.tar.gz
$ cd libgd-2.3.1
$ ./configure --prefix=/home/[username]/[libgd-location] \
--with-jpeg=/home/[username]/[libjpeg-location] \
--with-png=/home/[username]/[libpng-location] \
--with-zlib=/home/[username]/[zlib-location]
$ make
$ make check
$ make install
安装libgd2时, 要指向libjpeg, libpng和zlib的位置
3) 下载安装gnuplot
gnuplot: gnuplot homepage
$ tar zxvf gnuplot-4.4.0.tar.gz
$ cd gnuplot-4.4.0
$ ./configure --prefix=/home/[username]/[gnuplot4-location] \
--with-gd=--with-gd=/home/[username]/[libgd2-location]
$ make
$ make check
$ make install
在安装gnuplot时, 需要指定libgd2的位置, 才能成功调用png输出
4) 检查
$ gnuplot
$ gnuplot> set terminal
# ...
# gif ...
# ...
# png ...
# ...
# jpeg ...
# ...
完成~