X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 05 Feb 2014 06:08 AM by  anon
Color definition with tvlct
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:7
New Member


--
05 Feb 2014 06:08 AM
    With the tvlct routine it is possible to define colors, which can be used in direct graphics, such as: loadct, 3 ;load the red temperature color tablestretch, 0, 254 ;stretch the image display color tabletvlct, 0, 192, 0, 255 ;define green color (index 255)shade_surf, dist(100), /norm, color=green, /dev ;plot test data with green axes Unfortunately, the stretch routine decreased the number of colors in the color table, because index 255 (in the example above) is now occupied by the green color. How can I defined some colors, without reducing the numbers of colors in the color table?

    Deleted User



    New Member


    Posts:
    New Member


    --
    05 Feb 2014 07:46 AM
    If you insist on working in indexed color mode, it is really impossible to avoid contaminating the color table with drawing colors. The secret is to work with color decomposition turned on. If you prefer to work with direct graphics commands (like TV and PLOT), I recommend you switch to Coyote Graphics commands. These commands are wrappers for direct graphics commands, but they have all the functionality and sophistication of the new function graphics system in IDL. With these commands you don't have to worry about what color mode you are in, etc. The commands will do the right thing for you. :-) http://www.idlcoyote.com/.../coyote_graphics.php
    You are not authorized to post a reply.