Chapter 2. Tutorial: essential gnuplot


This chapter covers

  • Invoking gnuplot
  • Plotting functions and data
  • Saving and exporting
  • Managing options
  • Getting help

This chapter introduces gnuplot’s most important features: generating plots, saving them to a file, and exporting graphs to common graphics file formats. I’ll also explain briefly how to set options and how to access gnuplot’s built-in documentation. This chapter covers those commands that you’ll find yourself using almost every time you start up gnuplot. In the next couple of chapters, you’ll learn about further features for graphical analysis and how to manage data sets and files. By the end of chapter 4, you’ll know most of the commands you’ll use on a day-to-day basis.

Are you surprised that just a few chapters are sufficient to get you this far? Congratulations! You just discovered why gnuplot is cool: it makes easy things easy, and hard things possible. This chapter and the next two cover the easy parts. As to the hard parts ... well, that’s what the rest of this book is about.

2.1. Simple plots

2.2. Saving commands and exporting graphics

2.3. Managing options with set and show

2.4. Getting help

2.5. Summary