Re: How to create a colour table in IDL? [message #89986 is a reply to message #89985] |
Tue, 13 January 2015 04:28   |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
On Tuesday, January 13, 2015 at 12:46:10 PM UTC+1, Madhavan Bomidi wrote:
> Hello Helder,
>
> Thanks for your response but it doesn't work.
>
> I use the following lines in the code:
> --------------------------------------------------------
> device, decomposed=1
> LoadCT, 70
>
> mg_horizon,indgen(4600),randomn(seed,12,4600),nbands=6, xstyle=1, ystyle=1
> --------------------------------------------------------
>
> I get the following error:
> % LOADCT: Table number must be from 0 to 40
>
> Note: You can download mg_horizon.pro from https://github.com/mgalloy/mglib/tree/master/src/vis/lineplo ts
>
> Can anyone help me how I can use the colour table XLOADCT: 70 - CB-RdBu - (shown in http://www.exelisvis.de/docs/loadingdefaultcolortables.html)?
>
> Thanking you once again,
> With regards,
> Madhavan
>
> On Tuesday, January 13, 2015 at 11:54:12 AM UTC+1, Helder wrote:
>> Just in case you don't want to use David's library, then you have to make sure that decomposed is off:
>>
>> device, decomposed=0
>> window, xsize=300, ysize=300
>> tv, dist(300)
>>
>> To check for your current decomposition state, use:
>> If "decomposed" stuff is not your thing, I would recommend to do the following:
>> device, get_decomposed=current_decomp_Value
>> print, 'my current decomposed value is ', current_decomp_Value
>>
>> device, decomposed=0
>> ;do you calculations/imaging here
>>
>> ;restore the previous decomposition state:
>> device, decomposed=current_decomp_Value
>>
>> If you're not sure what decomposed means and does, used David's libary or read his books (the second option gives you more than the first).
>>
>> Regards,
>> Helder
Maybe you have an older version of IDL? I could not find if the tables have been updated somewhen along the history of IDL.
If you use
loadct, GET_NAMES=names
print, names
you get a list of available paletts.
good luck.
h
|
|
|