Chapter 11. Automation, scripting, and animation
This chapter covers
- Loops and conditionals
- Command files and batch processing
- Calling gnuplot from other programs
- Animations
In the preceding chapters, we’ve studied most commands and options that can be used from within gnuplot. But up to this point, our discussions assumed that you’d be running gnuplot interactively: entering commands, viewing plots, and then entering more commands.
But sometimes that’s not what you want. For instance, you may have a large number of data sets and just want to convert all of them to plots: it would be great to automate this task through scripting. Or you may have a cron job running nightly to scan web server logs and want it to also generate some plots showing the number of hits per hour, without requiring human intervention: that’s batch processing. Or you might want to use gnuplot as a graphing back end, while tendering control to some other program.