This shows you the differences between two versions of the page.
|
ep:labs:05:contents:tutorial:ex4 [2019/10/27 17:06] emilian.radoi created |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== 04. [10p] Animations ==== | ||
| - | |||
| - | For very basic animations in Gnuplot you would need to set up a loop, decide what commands to give to Gnuplot and use the pipe utility to pipe that command into Gnuplot. | ||
| - | |||
| - | Example 1: | ||
| - | <code> | ||
| - | $ for ((i=-70; i<70; i++)); do echo -e "set sample 50000; set yrange [-40:40]; plot $i*sin(x)*cos(x) \n"; done | gnuplot | ||
| - | </code> | ||
| - | |||
| - | Example 2: | ||
| - | |||
| - | <code> | ||
| - | $ for ((i=-100; i<100; i++)); do echo -e "set isosample 100; spl [:] [:] [-100:100] $i*(sin(sqrt(x**2+y**2))/sqrt(x**2+y**2)) \n"; done | gnuplot -persist | ||
| - | </code> | ||