2017-09-20 72 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