0

I have trouble plotting different colours in IDL. If I do the following:

loadct, 13
plot, x, y, color=n

No matter what value I put for n, I can only get different shades of red. How can I plot in other colours?

Eric Brown
  • 13,774
  • 7
  • 30
  • 71
ylangylang
  • 3,294
  • 11
  • 30
  • 34

2 Answers2

1

You are in decomposed color mode; change to indexed color mode with:

device, decomposed=0
mgalloy
  • 2,356
  • 1
  • 12
  • 10
0

To answer my own question:

I managed to plot in colours using the getcolor function. I find it much more straightforward than doing it normally.

colors = [getcolor('white'), getcolor('red'), getcolor('blue'), getcolor('green'), getcolor('magenta'), getcolor('cyan')]
ylangylang
  • 3,294
  • 11
  • 30
  • 34