[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 20030924:GEMPAK GIF white background
- Subject: Re: 20030924:GEMPAK GIF white background
- Date: Wed, 15 Oct 2003 15:02:33 -0600 (MDT)
Donna,
Apologies for sending you down an arduous path...
The best and easiest way to achieve this is to edit:
/home/gempak/GEMPAK6/gempak/tables/colors/coltbl.xwp
(jweber) lenny:/home/gempak/GEMPAK6/gempak/tables/colors 27 % m coltbl.xwp
! COLTBL.XWP
!
! Default XWP and XW color table
!
!Color name Abrev Red Green Blue X color name
BLACK BLA 0 0 0 black
VANILLA VAN 255 228 220 bisque1
RED RED 255 0 0 red
GREEN GRE 0 255 0 green
BLUE BLU 0 0 255 blue
YELLOW YEL 255 255 0 yellow
CYAN CYA 0 255 255 cyan
MAGENTA MAG 255 0 255 magenta
BROWN BRO 139 71 38 sienna3
CORAL COR 255 130 71 sienna1
APRICOT APR 255 165 79 tan1
PINK PIN 255 174 185 LightPink1
DKPINK DKP 255 106 106 IndianRed1
MDVIOLET MDV 238 44 44 firebrick2
MAROON MAR 139 0 0 red4
FIREBRIC FIR 205 0 0 red3
ORRED ORR 238 64 0 OrangeRed2
ORANGE ORA 255 127 0 DarkOrange1
DKORANGE DKO 205 133 0 orange3
GOLD GOL 255 215 0 gold1
DKYELLOW DKY 238 238 0 yellow2
LWNGREEN LWN 127 255 0 chartreuse1
MDGREEN MDG 0 205 0 green3
DKGREEN DKG 0 139 0 green4
GRPBLUE GRP 16 78 139 DodgerBlue4
LTBLUE LTB 30 144 255 DodgerBlue1
SKY SKY 0 178 238 DeepSkyBlue2
MDCYAN MDC 0 238 238 cyan2
VIOLET VIO 137 104 205 MediumPurple3
PURPLE PUR 145 44 238 purple2
PLUM PLU 139 0 139 magenta4
WHITE WHI 255 255 255 white
BLACK BLA 0 0 0 black
and put:
WHITE WHI 255 255 255 white
as the first entry.
You could re-name this file coltbl.xwp_white
and it should look like this:
(jweber) zero:/export/upc/gempak/GEMPAK5.6/gempak/tables/colors 4 % m
coltbl.xwp_white
! COLTBL.XWP
!
! XWP and XW color table for white background
!
!Color name Abrev Red Green Blue X color name
WHITE WHI 255 255 255 white
VANILLA VAN 255 228 220 bisque1
RED RED 255 0 0 red
GREEN GRE 0 255 0 green
BLUE BLU 0 0 255 blue
YELLOW YEL 255 255 0 yellow
CYAN CYA 0 255 255 cyan
MAGENTA MAG 255 0 255 magenta
BROWN BRO 139 71 38 sienna3
CORAL COR 255 130 71 sienna1
APRICOT APR 255 165 79 tan1
PINK PIN 255 174 185 LightPink1
DKPINK DKP 255 106 106 IndianRed1
MDVIOLET MDV 238 44 44 firebrick2
MAROON MAR 139 0 0 red4
FIREBRIC FIR 205 0 0 red3
ORRED ORR 238 64 0 OrangeRed2
ORANGE ORA 255 127 0 DarkOrange1
DKORANGE DKO 205 133 0 orange3
GOLD GOL 255 215 0 gold1
DKYELLOW DKY 238 238 0 yellow2
LWNGREEN LWN 127 255 0 chartreuse1
MDGREEN MDG 0 205 0 green3
DKGREEN DKG 0 139 0 green4
GRPBLUE GRP 16 78 139 DodgerBlue4
LTBLUE LTB 30 144 255 DodgerBlue1
SKY SKY 0 178 238 DeepSkyBlue2
MDCYAN MDC 0 238 238 cyan2
VIOLET VIO 137 104 205 MediumPurple3
PURPLE PUR 145 44 238 purple2
PLUM PLU 139 0 139 magenta4
BLACK BLA 0 0 0 black
WHITE WHI 255 255 255 white
and then call coltbl.xwp_white explicitly in yor GEMPAK routine.
Depending on your use, it may be easier to just edit the existing, and
then edit back..your call.
Please let me know if this works for you..I tested here and had success.
Cheers,
Jeff
---------------------------------------------------------------------
Jeff Weber address@hidden :
Unidata Program Center PH:303-497-8676 :
University Corp for Atmospheric Research 3300 Mitchell Ln :
http://www.unidata.ucar.edu/staff/jweber Boulder,Co 80307-3000 :
---------------------------------------------------------------------
On Wed, 15 Oct 2003 address@hidden wrote:
> ----------
> X-Sun-Data-Type: text
> X-Sun-Data-Description: text
> X-Sun-Data-Name: text
> X-Sun-Charset: us-ascii
> X-Sun-Content-Lines: 330
>
> Jeff,
>
> I am finally getting around to trying all of this but nothing seems
> to work. I want a gif on a white background instead of black so
> I can put it into a manuscript. I have
>
>
>
> phoenix% snprof
> SNFILE Sounding data file isoundall.snd
> DATTIM Date/time 800701/1200
> AREA Data area @DNR
> SNPARM Sounding parameter list tmpc;dwpc
> LINE Color/type/width/label/smth/fltr 2;3/1;1/3;3
> PTYPE Plot type/h:w ratio/margins skewt
> VCOORD Vertical coordinate type pres
> STNDEX Stability indices
> STNCOL Stability index color 1
> WIND Wind symbol/siz/wdth/typ/hdsz bk4/1.1/2
> WINPOS Wind position 1
> MARKER Marker color/type/size/width/hw 0
> BORDER Background color/type/width 1/1/2
> TITLE Title color/line/title 0
> DEVICE Device|name|x size;y size|color gif|isoundall.gif
> YAXIS Ystrt/ystop/yinc/lbl;gln;tck dset
> XAXIS Xstrt/xstop/xinc/lbl;gln;tck -20/40/10
> FILTER Filter data factor no
> CLEAR Clear screen flag YES
> PANEL Panel loc/color/dash/width/regn 0
> TEXT Size/fnt/wdth/brdr/N-rot/just/hw 1.0/21/hw
> THTALN THTA color/dash/width/mn/mx/inc 1/1/2
> THTELN THTE color/dash/width/mn/mx/inc 29/2/2
> MIXRLN MIXR color/dash/width/mn/mx/inc 8/3/2
> Parameters requested: SNFILE,DATTIM,AREA,SNPARM,LINE,PTYPE,VCOORD,STNDEX,
> STNCOL,WIND,WINPOS,MARKER,BORDER,TITLE,DEVICE,YAXIS,XAXIS,FILTER,CLEAR,
> PANEL,TEXT,THTALN,THTELN,MIXRLN.
>
> I have tried setting BORDER = 31/1/2 or 32/1/2. I have also tried
> COLORS=101=31 and COLORS=101=32. None of this seems to work. I am
> appending the file isoundall.snd
>
> Donna Tucker
>
> >
> > Hi Donna,
> >
> >
> > (jweber) lenny:/home/jweber 149 % snprof
> > SNFILE Sounding data file $GEMDATA/HRCBOB.SND
> > DATTIM Date/time LAST
> > AREA Data area WV
> > SNPARM Sounding parameter list ;TMPC;;HGHT;DWPC;BRBM
> > LINE Color/type/width/label/smth/fltr 3
> > PTYPE Plot type/h:w ratio/margins LOG
> > VCOORD Vertical coordinate type PRES
> > STNDEX Stability indices SHOW
> > STNCOL Stability index color 1
> > WIND Wind symbol/siz/wdth/typ/hdsz BM1
> > WINPOS Wind position 1
> > MARKER Marker color/type/size/width/hw 0
> > BORDER Background color/type/width 1
> > TITLE Title color/line/title 1
> > DEVICE Device|name|x size;y size|color XW
> > YAXIS Ystrt/ystop/yinc/lbl;gln;tck
> > XAXIS Xstrt/xstop/xinc/lbl;gln;tck
> > FILTER Filter data factor YES
> > CLEAR Clear screen flag YES
> > PANEL Panel loc/color/dash/width/regn 0
> > TEXT Size/fnt/wdth/brdr/N-rot/just/hw 1
> > THTALN THTA color/dash/width/mn/mx/inc 0
> > THTELN THTE color/dash/width/mn/mx/inc 0
> > MIXRLN MIXR color/dash/width/mn/mx/inc 0
> > Parameters requested: SNFILE,DATTIM,AREA,SNPARM,LINE,PTYPE,VCOORD,STNDEX,
> > STNCOL,WIND,WINPOS,MARKER,BORDER,TITLE,DEVICE,YAXIS,XAXIS,FILTER,CLEAR,
> > PANEL,TEXT,THTALN,THTELN,MIXRLN.
> >
> > ---
> >
> >
> >
> > GEMPAK-SNPROF>help border
> > BORDER
> >
> > BORDER is the color, line type and line width of the background and
> > underground plot separated with slashes:
> >
> > background color; station line color; fill color/
> > background line type; station line type /
> > background line width; station line width
> >
> > If the color is 0, no background will be drawn. The defaults for
> > color, line type and line width are each 1.
> >
> > -----
> >
> > So, depending on your device output:
> >
> > GEMPAK-SNPROF>help colors
> > COLORS
> >
> > COLORS specifies a list of color numbers which must be separated
> > using semicolons:
> >
> > color 1 ; color 2 ; ... ; color n
> >
> > The last color in the list will be repeated, if necessary, to
> > determine all colors required by the program.
> >
> > Colors may be entered as a range in the form: first-last-increment.
> > If the increment is not entered, 1 is assumed.
> >
> > Color-coding of any parameter may be done based on its own value or
> > on the value of any other computable parameter. There is a one-to-
> > one correspondence between the elements in the color list and the
> > elements in the parameter list (e.g., SFPARM). To color-code any
> > parameter, replace its corresponding color number in the COLORS
> > list with the form:
> >
> > (v1;v2;...;vN-1/c1;c2;...;cN/PARM/E) or
> > (v1-vN-1-vInc/c1-cN-cInc/PARM/E) or
> > a combination of a list and a range
> >
> > where the v's are parameter values, the c's are color numbers, and
> > PARM is the parameter whose value determines the color. If PARM
> > is omitted, the parameter will be color-coded based on its own value.
> > The number of values must be one less than the number of colors. If
> > a value range is used, an increment must be specified. If a color
> > range is used and no increment is specified, 1 is assumed. For
> > example, to color-code a marker based on the 3-hour flash flood
> > guidance value, the color element corresponding to the parameter
> > MARK could be specified as:
> >
> > (0.5;1;1.5;2;3/2;19;21;22;6;4/FF03)
> >
> > meaning that values less than or equal to .5 inch would be plotted
> > with color 2, values greater than .5 but less than or equal to 1
> > would be plotted with color 19, etc.
> >
> > The E is a flag to indicate whether to include the break value with
> > the lower range or the upper range of values. Valid values are L
> > and U, respectively. The default is L for inclusion in the lower
> > range of values. In the above example, the first data range is
> > X <= 0.5, the second is 0.5 < X <= 1.0, etc. If the U flag is added,
> > the ranges change to X < 0.5, 0.5 <= X < 1.0, etc.
> >
> > If the input is blank, a default of 1 is used. If a color number
> > of 0 is entered, that parameter or line will not be plotted.
> > New color assignments may be made by appending the following commands
> > to the color number:
> >
> > =INIT -- all colors are initialized to device-dependent
> > colors
> >
> > =NAME -- this color number is set to the color specified
> > in NAME
> >
> > =r:g:b -- this color number is set using RGB components in
> > r, g, and b which must be separated using colons.
> > These components must be in the range 0 - 255.
> >
> > Note that only =INIT may be appended to a range.
> >
> > Color number 101 is the background color.
> >
> > Note that the GIF driver does not accept NAME.
> >
> > The following colors are the default colors for the given devices:
> >
> > XW,NC PS,PSP PSC GEMPAK NAMES X COLOR NAMES
> >
> > 1 31 VANILLA bisque1
> > 2 2 RED red
> > 3 3 GREEN green
> > 4 4 BLUE blue
> > 5 5 YELLOW yellow
> > 6 6 CYAN cyan
> > 7 7 MAGENTA magenta
> > 8 8 BROWN sienna3
> > 9 9 CORAL sienna1
> > 10 10 APRICOT tan1
> > 11 11 PINK LightPink1
> > 12 12 DKPINK IndianRed1
> > 13 13 MDVIOLET firebrick2
> > 14 14 MAROON red4
> > 15 15 FIREBRICK red3
> > 16 16 ORRED OrangeRed2
> > 17 17 ORANGE DarkOrange1
> > 18 18 DKORANGE orange3
> > 19 19 GOLD gold1
> > 20 20 DKYELLOW yellow2
> > 21 21 LWNGREEN chartreuse1
> > 22 22 MDGREEN green3
> > 23 23 DKGREEN green4
> > 24 24 GRPBLUE DodgerBlue4
> > 25 25 LTBLUE DodgerBlue1
> > 26 26 SKY DeepSkyBlue2
> > 27 27 MDCYAN cyan2
> > 28 28 VIOLET MediumPurple3
> > 29 29 PURPLE purple2
> > 30 30 PLUM magenta4
> > 31 32 WHITE white
> > 32 1 1 BLACK black
> > 2 G95 gray95
> > 3 G90 gray90
> > 4 G85 gray85
> > 5 G80 gray80
> > 6 G75 gray75
> > 7 G70 gray70
> > 8 G65 gray65
> > 9 G60 gray60
> > 10 G55 gray55
> > 11 G50 gray50
> > 12 G45 gray45
> > 13 G40 gray40
> > 14 G35 gray35
> > 15 G30 gray30
> > 16 G25 gray25
> > 17 G20 gray20
> > 18 G15 gray15
> > 19 G10 gray10
> > 20 G05 gray5
> >
> > On the color devices, colors 8 through 30 will provide a range of
> > colors from brown to red to orange to yellow to green to blue to
> > violet.
> > On the Postscript device, 20 gray shades are used.
> >
> >
> > If this does not clear it up, please send in a copy of your script and
> > we'll tune it to a white background ;)
> >
> >
> > ---
> >
> > So perhaps a entry like:
> >
> > BORDER Background color/type/width 31/1/1
> >
> > or
> >
> > BORDER Background color/type/width 32/1/1
> >
> > Depending upon DEVICE (31 or 32)..and choice of line type and color */1/1
> > which you will probably want to change for the white background....
> >
> >
> > Cheers,
> >
> > Jeff
> > ---------------------------------------------------------------------
> > Jeff Weber address@hidden :
> > Unidata Program Center PH:303-497-8676 :
> > University Corp for Atmospheric Research 3300 Mitchell Ln :
> > http://www.unidata.ucar.edu/staff/jweber Boulder,Co 80307-3000 :
> > ---------------------------------------------------------------------
> >
> > On Thu, 25 Sep 2003 address@hidden wrote:
> >
> > > Jeff,
> > >
> > > I looked these up but nothing seems to work. I am using the program
> > > sfprof. Does gpcolor work only with gp programs? Is there a way
> > > to set the background on the gif image to white using sfprof?
> > >
> > > Donna Tucker
> > > http://chinook.phsx.ukans.edu/tucker.html
> > > Associate Professor 1251 Wescoe Hall Dr.
> > > address@hidden Department of Physics and Astronomy
> > > (785) 864-4738 University of Kansas
> > > (785) 864-5262 (fax) Lawrence, KS 66045-7582
> > >
> > >
> > > >
> > > > Hi Donna,
> > > >
> > > > Yes is the answer, not quite sure what program in GEMPAK you are running
> > > > but please see:
> > > >
> > > > http://www.unidata.ucar.edu/cgi-bin/msgout?/glimpse/gempak/5544
> > > >
> > > > and
> > > >
> > > > http://www.unidata.ucar.edu/cgi-bin/msgout?/glimpse/gempak/5504
> > > >
> > > > and
> > > >
> > > > http://www.unidata.ucar.edu/cgi-bin/msgout?/glimpse/gempak/5055
> > > >
> > > > Please let us know if you do not find your scenario in the above URL's.
> > > >
> > > >
> > > > Cheers,
> > > >
> > > > Jeff
> > > > ---------------------------------------------------------------------
> > > > Jeff Weber address@hidden :
> > > > Unidata Program Center PH:303-497-8676 :
> > > > University Corp for Atmospheric Research 3300 Mitchell Ln :
> > > > http://www.unidata.ucar.edu/staff/jweber Boulder,Co 80307-3000 :
> > > > ---------------------------------------------------------------------
> > > >
> > > > On Thu, 25 Sep 2003, Unidata Support wrote:
> > > >
> > > > > cc:
> > > > > Subject:
> > > > > Reply-to: address@hidden
> > > > > --------
> > > > >
> > > > > ------- Forwarded Message
> > > > >
> > > > > >To: address@hidden
> > > > > >From: address@hidden
> > > > > >Subject: gempak gif
> > > > > >Organization: UCAR/Unidata
> > > > > >Keywords: 200309242138.h8OLc2k1018527
> > > > >
> > > > > Is it possible to create a gif file in gempak with a white background?
> > > > >
> > > > > Donna Tucker
> > > > > http://chinook.phsx.ukans.edu/tucker.html
> > > > > Associate Professor 1251 Wescoe Hall Dr.
> > > > > address@hidden Department of Physics and Astronomy
> > > > > (785) 864-4738 University of Kansas
> > > > > (785) 864-5262 (fax) Lawrence, KS 66045-7582
> > > > >
> > > > >
> > > > > ------- End of Forwarded Message
> > > > >
> > > > >
> > > >
> > >
> >
> ----------
> X-Sun-Data-Type: default
> X-Sun-Data-Description: default
> X-Sun-Data-Name: isoundall.snd
> X-Sun-Encoding-Info: uuencode
> X-Sun-Content-Lines: 95
>
> begin 600 isoundall.snd
> M1T5-4$%+($1!5$$@34%.04=%345.5"!&24Q%( $ !"P !0
> M " ! 0 8$ & " 0, &] 0 @$ "! @
> M H$ " /__]CQ QAP\
> M
> M
> M
> M
> M
> M
> M
> M
> M // /@
> M
> M
> M
> M
> M
> M
> M
> M
> M
> M
> M $1!5$5424U%4U1)
> M1%-43DU33$%44TQ/3E-%3%935$%40T]53E-41#(
> M
> M
> M
> M
> M
> M
> M
> M
> M
> M
> M G#P ,-[T 2P___8\?__V/'__]CQ___8\?__V/'__]CQ___8
> M\?__V/'__]CQ___8\?__V/'__]CQ___8\?__V/'__]CQ___8\?__V/'__]CQ
> M___8\?__V/'__]CQ___8\?__V/'__]CQ___8\?__V/'__]CQ___8\?__V/'_
> M_]CQ___8\?__V/'__]CQ___8\?__V/'__]CQ___8\?__V/'__]CQ___8\?__
> MV/'__]CQ___8\?__V/'__]CQ___8\?__V/'__]CQ___8\?__V/'__]CQ___8
> M\?__V/'__]CQ___8\?__V/'__]CQ G#T1.4B 1L5 /A___UPD 9(
> M(" @(" @(" @(" @___8\?__V/'__]CQ___8\?__V/'__]CQ___8\?__V/'_
> M_]CQ___8\?__V/'__]CQ___8\?__V/'__]CQ___8\?__V/'__]CQ___8\?__
> MV/'__]CQ___8\?__V/'__]CQ___8\?__V/'__]CQ___8\?__V/'__]CQ___8
> M\?__V/'__]CQ___8\?__V/'__]CQ___8\?__V/'__]CQ___8\?__V/'__]CQ
> M___8\?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