concept terminal in category gnuplot

This is an excerpt from Manning's book Gnuplot in Action.
Terminals— Handling of terminals and output file formats has been greatly improved and unified. A major breakthrough is the development of a family of terminals that are all based on a single set of contemporary libraries for graphics and text rendering. Because these terminals all share the same back end, you can now create bitmaps (PNG), vector images (PDF), and graphs for interactive viewing (wxWidgets) with consistent appearance across all formats. Gnuplot takes advantage of the contemporary features of the underlying libraries to produce high-quality graphs through the use of over-sampling, anti-aliasing, and so on.
Both the GUI button and the clipboard are relatively new methods for exporting a graph. They’re easy to use but don’t allow for much flexibility in the appearance of the generated graph. To get full control over the export process, you need to become familiar with gnuplot’s terminal facility.
In gnuplot parlance, a terminal is a graphics-capable output device. Traditionally, this may have been a specific piece of hardware (such as a pen-and-ink plotter), but today a gnuplot terminal is merely a reference to the underlying graphics library.
export( file, terminal ) = sprintf( "set t push; set t %s; set o '%s'; replot; set o; set t pop", terminal, file )

This is an excerpt from Manning's book Gnuplot in Action: Understanding Data with Graphs.
Listing 2.3. A useful script to export the current plot to file
set terminal push # save the current terminal settings set terminal png # change terminal to PNG set output "$0" # set the output filename to the first option replot # repeat the most recent plot command set output # restore output to interactive mode set terminal pop # restore the terminal
We’ll discuss the set command in much more detail in chapter 4. For now, it’s enough to understand that it sets a parameter (such as terminal) to a value. However, and this is often forgotten, it does not generate a plot! The only commands to do so are plot, splot (which is used for three-dimensional graphs, which we’ll discuss in chapter 8), and replot (which simply repeats the most recent plot or splot command).
Gnuplot supports more than 70 terminals: devices for which it can produce output. This may seem daunting, but the reality is that most of them are obsolete today—the number of terminals that are relevant is (thankfully) much smaller.
We can divide the currently used terminals broadly into three groups: terminals that produce output in a standard graphics file format (bitmaps: GIF, JPG, PNG; scalable vector graphics: SVG), terminals that produce output primarily for print (PostScript and PDF), and terminals for interactive use.