Skip to content

Instantly share code, notes, and snippets.

@phelrine
Created January 12, 2011 05:09
Show Gist options
  • Save phelrine/775716 to your computer and use it in GitHub Desktop.
Save phelrine/775716 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
plot = open("|gnuplot","w")
plot.puts "set xrange [0:6.3]\n"
for i in 1..600
plot.puts "plot sin(x - #{i * 0.1}) notitle\n"
plot.flush
sleep(1.0/60.0)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment