This is supposed to show the color-coded state of a number of state machines (y axis) over time (x axis). There are eight states, so I've limited the palette with maxcolors 8. So far so good - as long as I use the built-in palette (comment out line 20):
If I define my own palette (line 20), things get weird and I get this result:
...which has 13 irregularly-spaced colors on the color bar. To my understanding, the main purpose of the maxcolors option was to adapt to less-capable terminals, so ideally the maxcolors limit should be absolute. Indeed Gnuplot does limit the number of colors, just not to the specified number.
Is this a bug, or did I misunderstand something? I've spent some hours experimenting and googling, but without success.