Re: Questions about IDL 8.0 [message #73737 is a reply to message #73732] |
Tue, 23 November 2010 16:54   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> Ah, I see. CTLOAD returns a 256x3 array, because that's
> what TVLCT expects. Makes sense I guess that new graphics
> is doing everything in a contrary fashion. Why leverage
> old code when you make people write everything from
> scratch? :-)
>
> Cheers,
>
> David
>
> P.S. I guess I'll add a NG keyword to flip things around
> so I can use the program where I need it. Thanks!
I just point out that FSC_Color has the same problem
when returning a color triple. TVLCT expects a column
vector and new graphics routines (in fact, all *object
graphics* routines) require a row vector. (I had
forgotten all about this, I guess.)
Anyway, the way the problem is solved in FSC_Color's
case in that you can set the ROW keyword to get the
color triple returned as a row vector instead of as
a column vector.
IDL> aColor = FSC_Color('wheat', /Triple, /Row)
IDL> Help, aColor
ACOLOR INT = Array[3]
IDL> bColor = FSC_Color('wheat', /Triple)
IDL> Help, bColor
BCOLOR INT = Array[1, 3]
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|