Chapter 9. Color
This chapter covers
We haven’t talked much about color yet in this book, so you might be wondering whether gnuplot isn’t good at handling it. Quite the opposite! Gnuplot has some clever features to handle palette-mapped color plots: plots in which colors are chosen from a continuous spectrum or palette and used to express a numeric quantity.
When we briefly discussed color before (in chapter 5), we were only interested in specifying a single color at a time: one color for the first data set, a different color for the second data set, and so forth. In this chapter, we take the opposite view: color that varies smoothly, and therefore can be used to indicate continuous changes within a single data set.
But first we must set up the palette that we want to use for our plots. As we’ll see, this isn’t an easy process, and the set palette command we use for this purpose is complicated. In the first part of this chapter, we’ll discuss all aspects of defining a palette using set palette in detail. If you’re in a rush, you might want to skip ahead to section 9.3, where I describe some complete palettes that you can use in your graphs right away, together with some recommendations for good palette design.