comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: METAFILE + TVLCT
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: METAFILE + TVLCT [message #43269 is a reply to message #43268] Mon, 28 March 2005 08:33 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ed Hyer writes:

> I got started using the 255-color color tables IDL provides, which are
> useful immediately for quick plotting. After a while, I got greedy and
> started using TVLCT when I needed another color that wasn't in the
> color table I was using. Now I am creating my graphics as METAFILES and
> have found this trick doesn't seem to work. I initialize the device as
> follows:
>> set_plot,'METAFILE'
>> device,file=outfile
>> device,xsize=xsize/30,ysize=ysize/30
>> device,/index
>> device,true=0
> Then, I use TVLCT to give me colors I need, such as adding a gray for
> NODATA to my usual ROYGBIV colors:
>> loadct,39
>> tvlct,[100,100,100],1
> This works beautifully on the WIN display device, but does not change
> the colors at all in the METAFILE.
> Is there another workaround for this?

Now that I know what the METAFILE graphics device is, maybe I
can offer a suggestion. Several graphics devices, apparently,
do not allow you to load colors once you have made them
the current graphics device. (The PRINTER device is the
most notorious of these.) Knowing Windows as intimately as
I do, I could believe the METAFILE device might also be one
of these.

In this case, it is necessary to load the color table
*before* you SET_PLOT to the device. This action then copies
the current colors into the device color tables, and you
have to pretty much be content with what you've got. (Personally,
I think RSI is trying to teach us an important life lesson
here, but your mileage may vary.)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Filled contours plotted on top of the continent outlines ???
Next Topic: The Greatest News Ever!

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Dec 05 04:43:39 PST 2025

Total time taken to generate the page: 2.47625 seconds