Plotting with pictures
A style, popular in journalism, for presenting a small set of data employs a technique illustrated in the following figure:
The previous figure shows the growth in warhead inventory of a fictional nation over time. A generic image of a bomb is scaled vertically to indicate the quantity for each year plotted.
Getting ready
The public domain bomb image that is used for the plot is called bomb.png
and is provided in the datafiles folder for this chapter. You can modify this recipe to use your own pictures, in a variety of formats. To see which file types your version of gnuplot can use, type show datafile binary filetypes
at the gnuplot interactive prompt. You will need to modify some of the parameters in the script to take into account the pixel dimensions of your image.
How to do it…
The following script produces the Elbonian bomb plot:
set title "Elbonian Warhead Inventory" font "Times,24" offset 0,2 set xlabel "Year" font "Times,12" set xlabel "Year" font "Times,16" set...