>
> Hi,
> I need some info about ctrans. When i use `ctrans -d ps.color ' to
> convert a gmeta file with full color, it just converts the plot and the
> color bar without the actual grid and other info, that normally appears
> with the gmeta file. This is not the case when i use the CGREYS option
> (otherwise i am using CFALL option) in CEDRIC and use the same command.
> Here it does give me the grid and other info, but only in the greyscale.
> Is this a bug or there is way around it . Please help me.
> LakshmiNarasimhan
> CSU
>
Dear Lakshmi,
Thanks for providing us with your metafiles. I'm including the answer
to your question to the ncarg-talk email list so that others may
benefit from the solution as well.
The grayscale gmeta file was actually defining the background color to
be white, and the foreground to be black, while the color gmeta file
was defining the exact opposite (black background/white foreground).
Since PostScript doesn't have the concept of a "background color",
it is in effect ignored. Thus, when you convert a metafile with a black
background and a white foreground to PostScript and print it out,
you won't see the black background, and your white foreground won't
be seen on a white sheet of paper.
There are a couple of solutions to this problem. One is to use the
"psblack" filter, which effectively switches your background and
foreground colors. Use it as follows:
ctrans -d ps.color gmeta1 | psblack > gmeta1.ps
The other (better) solution is to modify your NCAR Graphics Fortran or
C program to produce PostScript files directly.
You must have at least version 4.0 of NCAR Graphics to use this direct
PostScript driver. To use it, set the third argument of "gopwk" (or
"gopen_ws") to a value from 20 to 31. Value '20' will produce a color
PostScript file in portrait mode, which is probably what you want in
this case.
To find out more about the direct PostScript driver, do a man on
"gopwk" or go to:
http://ngwww.ucar.edu/ngdoc/ng/gks/ps.html
You can also try running any of the "ncargex" examples and force them
create a PostScript file with:
ncargex -W 20 pgkex01
This will produce a PostScript file called "pgkex01.ps". You can look
at the program "pgkex01.f" to see how the PostScript file was created.
--Mary
This archive was generated by hypermail 2b29 : Tue Aug 08 2000 - 10:53:40 MDT