[Thread Prev][Thread Next][Index]

Re: [ferret_users] pen color and postscript



Hi Emilie -

It is often true that changing the pen color and then changing it back produces unpredictable results in the postscript output.

One way to fix this kind of thing is to edit the postscript, which is straightforward.

Make the plot with the unwanted labels (perhaps a dummy plot) in a pen color that is otherwise unused, say green (pen 3). Then make your real plot in black, with the axis labels you want. Or overwrite the green plot (with the bad labels) with a black plot with good labels. A really funky way to force this to happen is to use 2 overlapping viewports (set vi full .... set vi full2). One the screen the plots will appear one on top of the other. Convert the metafile to postscript with Fprint -l cps. Then edit the postscript:

You will find near the top of the postscript file TWO sets of lines like the following:

ct 1 [0.000000 0.000000 0.000000] put
ct 2 [1.000000 0.000000 0.000000] put
ct 3 [0.000000 1.000000 0.000000] put
ct 4 [0.000000 0.000000 1.000000] put
ct 5 [0.000000 1.000000 1.000000] put
ct 6 [1.000000 0.000000 1.000000] put

Each line defines the line colors that will be printed (in RGB), corresponding to pens 1-6 in Ferret.

Just change line 3 of the above (if you have used pen 3 as dummy) to:

ct 3 [1.000000 1.000000 1.000000] put

which is white!

It is a kluge [bidule], but it works.

Billy K

On Jan 12, 2007, at 7:00 AM, Emilie Vanvyve wrote:

Hello,

I have a problem someone might have experienced. All clues and solutions welcome!

I plot a sounding of the temperature. The vertical axis (initially sigma coordinate) is transformed into a logarithmic axis (pressure). This implies that the axis labels are 2 (=10**2), 3 (=10**3), etc. I don't want these numbers to appear, I want labels in hPa: 1000, 800, 600, 400, 200, 100, etc. I add these labels myself with a script (lopressureaxis here under). However, I need to erase first the "2" and "3". For this, I use a "white" pen and overwrite the numbers. It works perfectly on the screen but not in the saved postscript. The white colour is converted back to black and so my labels "2" and "3" appear together with "1000 hPa" and "100 hPa".

The script doing this is as follows (unuseful parts removed):

plot/nolabel/vlimit=3:1.85:-1/i=7:40/vs/line/set temp1,pressure1
go layout* ; ppl xaxis -90,40,20 ; ppl xfor (i3) ; ppl yfor (i1) ; ppl plot

  pplus color 1 100 100 100  !transform the black pen into a white pen
label -93, 3.015, 1,, 0.20 "@P73" ; label -93.5, 3.015, 1,, 0.20 "@P73" !overwrite "3" in white label -93, 2.015, 1,, 0.20 "@P72" ; label -93.5, 2.015, 1,, 0.20 "@P72" !overwrite "2" in white pplus color 1 0 0 0 !get the black ben back to its normal state

go logpressureaxis** -90 -92 40 42 -95 !display labels for the vertical axis

plot/nolabel/over/symbol=01/size=0.18/vs temp2,pressure2 !add another temperature sounding
...

(* the script layout sets bigger font sizes, etc.)

Does the problem occur because I use the black pen? Is there another way to prevent Ferret from displaying "2" and "3" on the vertical axis?

Thanks in advance for any idea!
Emilie V.


<a01_z_T_Q_198708.tif>







[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement