Layers
A gnuplot plot is built up by drawing its various components in a fixed order. This order can be modified by assigning some components to a specific layer using the keywords behind, back, or front. For example, to replace the background color of the plot area you could define a colored rectangle with the attribute behind.set object 1 rectangle from graph 0,0 to graph 1,1 fc rgb "gray" behindThe order of drawing is
behind back the plot itself the plot legend (`key`) frontWithin each layer elements are drawn in the order
grid, axis, and border elements pixmaps in numerical order objects (rectangles, circles, ellipses, polygons) in numerical order labels in numerical order arrows in numerical orderIn the case of multiple plots on a single page (multiplot mode) this order applies separately to each component plot, not to the multiplot as a whole.
Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley
Distributed under the gnuplot license (rights to distribute modified versions are withheld).