Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Cannot use other colors except for red

Help
2011-02-25
2013-06-03
  • Luke Stagner
    Luke Stagner
    2011-02-25

    HI all,
    I am having difficulty getting other colors to show up when plotting. loadct seems to work fine but no matter which table I load I always get the color red.

    I have tried
    device,color=24,/decompose
    but it says the color keyword cannot be used.

    any insights into this problem would be appreciated.

     
  • Hello,

    Would this example help? :

    GDL> $cat test.pro
    pro test
      device, decomposed=1
      device, get_decomposed=d
      print, 'device mode: ', d ? 'decomposed' : 'indexed'
      plot,
      oplot, , color='ff0000'x

      stop

      device, decomposed=0
      device, get_decomposed=d
      print, 'device mode: ', d ? 'decomposed' : 'indexed'
      plot,
      loadct, 1
      oplot, , color=200
    end
    GDL> test
    % Compiled module: TEST.
    device mode: decomposed
    % Stop encoutered: TEST                10 test.pro
    GDL> .cont
    device mode: indexed
    % Compiled module: LOADCT.
    % LOADCT: Loading table BLUE/WHITE

    Both ways I get a plot with one line white and another one in blue (using the X device).

    Sylwester

     
  • Luke Stagner
    Luke Stagner
    2011-02-25

    Thanks it worked great. I think all my problem was that I used decompose instead of decomposed.