Skip to content

Instantly share code, notes, and snippets.

@krantikal
Created March 31, 2021 17:29
Show Gist options
  • Save krantikal/0ed4839c359b35409892d65e1d741a7c to your computer and use it in GitHub Desktop.
Save krantikal/0ed4839c359b35409892d65e1d741a7c to your computer and use it in GitHub Desktop.
[Gnuplot Animation] Creating #animation in our favorite #plotting system
# output gif is must
set terminal gif animate delay 100
set output 'output.gif'
stats 'data.dat' nooutput
set xrange [-0.5:1.5]
set yrange [-0.5:5.5]
#do for [i=1:int(STATS_blocks)] {
# plot 'data.dat' index (i-1) with circles
#}
do for [i=1:5] {
plot 'data.dat' index (i-1) with circles
}
#set terminal gif animate delay 100
#set output "multiplot_animated.gif"
#checked 2021-03-31 - 10:53 PM, Works,Even generated gif is fine
n = 50
dphi = 2*pi/n
do for [i=0:(n-1)] {
phi = i*dphi
set multiplot layout 2,1
plot sin(x+phi)
plot cos(x+phi)
unset multiplot
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment