11.52.56 palette

set palette { <color> }

Pyxplot has a palette of colors which it assigns sequentially to datasets when colors are not manually assigned. This is also the palette to which reference is made if the user issues a command such as

plot sin(x) with color 5

requesting the fifth color from the palette. By default, this palette contains a range of distinctive colors. However, the user can choose to substitute his own list of colors using the set palette command. It should be followed by a comma-separated list of color names, for example:

set palette red,green,blue

If, after issuing this command, the following plot statement were to be executed:

plot sin(x), cos(x), tan(x), exp(x)

the first function would be plotted in red, the second in green, and the third in blue. Upon reaching the fourth, the palette would cycle back to red.

Any of the recognised color names listed in Section 19.4 can be used, or a numbered color from the present palette, or an object of type color.