Hi Lynn, Mick & Billy, The line color problem seems to happen only when 1. Ferret is run as 'ferret -gif' OR 2. Ferret's graphical window (X-window) is resized (using the maximize button at top-right corner of the window or by dragging at the corner of the x-window using mouse) In other cases, lines look fine..even with the "same pen number" (first argument to PPL COLOR) for all of the defined colors. So this problem may be associated with some feature of the X-windows. For gif output we can use FRAME/FILE option (remember don't start Ferret as 'ferret -gif'). Otherwise run ferret in metafile mode for getting output in ps format. ...we are free to define as many colors as we want !!! I made the attached figures by slightly modifing Lynn's script ( I repeated the 8 defined colors in the same order but with different values for j) as given here ! test_colors1.jnl !-------------------- ppl color,$2,$3,$4,$5 plot/i=1:100/over/color=$2/line/nolabel \ sin(3.14*i/100)-$1/100 ! call_test_colors1.jnl (both gif & ps output from the !---------------------- same script) ! \ cancel mode verify set mode meta set wind/size=.45 ! Plot one black line to start plot/i=1:100/color=1/line/nolabel sin(3.14*i/100) ! Defined colors (please note that only "3" is used ! as the color/pen number) repeat/j=1:5 go test_colors1 `j` 3 100 0 0 repeat/j=6:10 go test_colors1 `j` 3 100 50 0 repeat/j=11:15 go test_colors1 `j` 3 100 100 0 repeat/j=16:20 go test_colors1 `j` 3 0 40 0 repeat/j=21:25 go test_colors1 `j` 3 0 0 100 repeat/j=26:30 go test_colors1 `j` 3 40 60 60 repeat/j=31:35 go test_colors1 `j` 3 80 0 100 repeat/j=36:40 go test_colors1 `j` 3 80 60 100 repeat/j=41:45 go test_colors1 `j` 3 100 0 0 repeat/j=46:50 go test_colors1 `j` 3 100 50 0 repeat/j=51:55 go test_colors1 `j` 3 100 100 0 repeat/j=56:60 go test_colors1 `j` 3 0 40 0 repeat/j=61:65 go test_colors1 `j` 3 0 0 100 repeat/j=66:70 go test_colors1 `j` 3 40 60 60 repeat/j=71:75 go test_colors1 `j` 3 80 0 100 repeat/j=76:80 go test_colors1 `j` 3 80 60 100 ! output sp rm -f line_color.gif FRAME/FILE=line_color.gif sp rm -f line_color.ps cancel mode meta ; ppl clsplt sp Fprint -l cps -R -o line_color.ps metafile.plt sp rm -f metafile.plt* exit !--------end of call_test_colors1.jnl-------------- Hope This Helps With Regards Jaison On Fri, 12 Nov 2004, Billy Kessler wrote: > I have been able to use a system something like Mick's, that works. > I don't have time to write a simple example, but here is the guts > of code that makes and uses 6 colors plus black, and has altered > the colors, too (see attached plot). pen 2 is reused in this plot > to make an ugly yellow. > > plot/set/nolab/vs/line=1/sym=27/l=212:272/hli=-3:4:1/vli=-25:18:5 nino3smrg,z20av ! black > ... > ppl plot > plot/nolab/vs/line=2/sym=27/l=177:212/over nino3smrg,z20av ! red > plot/nolab/vs/line=3/sym=27/l=158:177/over nino3smrg,z20av ! green > plot/nolab/vs/line=4/sym=27/l=143:158/over nino3smrg,z20av ! blue > ppl color,5,0,70,70 > plot/nolab/vs/line=5/sym=27/l=89:143/over nino3smrg,z20av ! darker cyan > ppl color,6,70,0,70 > plot/nolab/vs/line=6/sym=27/l=33:89/over nino3smrg,z20av ! darker magenta > ppl color,2,70,70,0 ! reuse pen 2 > plot/nolab/vs/line=2/sym=27/l=1:33/over nino3smrg,z20av ! yellowish > > Gotta run, but this worked for me. Maybe a difference from Mick's > scheme is that I reset the color BEFORE each plot/over statement, > not between PLOT/SET and PLOT/OVER. And one essential is to reset > all the colors between each plot: > > ppl color,2,100,0,0; ppl color,5,0,100,100; ppl color,6,100,0,100 > > Billy K > -- ___________________________________________________ Jaison Kurian Centre for Atmospheric and Oceanic Sciences Indian Institute of Science B A N G A L O R E 560 012 Ph: +91-80-3942505 +91-80-3600450 Fax:+91-80-3600865 ___________________________________________________
Attachment:
line_color.gif
Description: GIF image
Attachment:
line_color.ps
Description: PostScript document