Re: Color display disappeared

From: Cam V. Tran (trancv@XXXXXX)
Date: Fri Jul 28 1995 - 10:06:18 MDT


Thanks for your help and pointer. Please let me
lay out the whole business as follows.

We have inherited some legacy code using an old
version of NCAR graphics. Essentially, the code
made use of the following calls

o opngks and clsgks

o setusv (with obsolete parameters 'IR', 'IG', 'IB',
                                       'IM', 'IN' )
o displa, set, ezxy

o line, points, pwrity (obsolete)

Plots are outputted to a metafile (with default name gmeta).

What I have in mind is to modify the code so one can either
output plots to a metafile (with a chosen name), or output
to a new X11 window (say, for interactive purpose), or both
(interactive but also say plots for future reference).
 
Unfamiliar with the NCAR graphics package and trying to minimize
effort, I tried to replace the calls opngks and clsgks as the
following in the case where plots go to a new X11 window and
a metafile.

>
> c Open gks package, open and activate workstation(s)
> call gopks (6, ignored)
> call gesc (-1391, 1, metafil, 1, 1, ch_ignored)
> call gopwk (1, 2, 1)
> call gopwk (10, 2, 8)
> call gacwk (1)
> call gacwk (10)
> c
> c......Plotting (doing several plots).......
> c==== Here goes legacy plotting code ====
> c
> c Deactive and close workstation(s), and clse gks package
> call gdawk(1)
> call gclwk(1)
> call gdawk(10)
> call gclwk(10)
> call gclks
>
> Here, "metafil" is the variable for the name of the output
> metafile; "ignored" and "ch_ignored" are dummy stuff.

As noted in the last email, the metafile is fine but the
output on screen loose color after the first plot.

Is there anyway to fix this with minimum effort? A time-consumming
way is to replace obsolete calls with current calls from the NCAR
GKS-0A Gpaphics. This will amount to throwing out setuvs calls
with obsolete parameters and replace them with gscr. Also, replace
pwrity calls and others if neccessary. Also, as you mentioned now
I need to set color atributes for BOTH X11 workstation and metafile.
Boy, it seem like a good deal of work!

Please let me know if there's way(s) to work around with minimum
effort.

Cam Tran (trancv@nosc.mil)
NRaD - Code 761
San Diego, CA 92152-5000
________________________________________________________________
     



This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 09:45:33 MDT