2017-09-20 73 views
1

例如,我需要添加哪些代码才能激活抗锯齿?如何在Gnuplot中使用抗锯齿来制作GIF?

set terminal gif animate delay 5 size 400, 250 
set output "example.gif" 

a = 0 

do for [i=1:100] { 
a = a + 0.1 
plot sin(x + a) 
} 

example.gif

我需要改变一些gnuplot的文件夹中的文件?我使用的是gnuplot的5.2版本。

回答

2

使用终端pngcairo有抗锯齿创建单独的PNG文件:

set terminal pngcairo size 400, 250 

a = 0 

do for [i=1:100] { 
set output sprintf("%.3d.png",i) 
plot sin(x + a) 
a = a + 0.1 
} 

然后你就可以组装一个GIF文件,例如,用的convertImageMagick

convert -delay 5 -loop 0 *.png animation.gif 

enter image description here