[Thread Prev][Thread Next][Index]
Re: one plot bringing two metafiles up
Hi Hemer,
It is always better to insert few lines towards the begining and
ending of your scripts to remove previous versions of metafiles and to create
ps/pdf file from the metafile using Fprint command. This will ensure that
always you are using the proper metafile.plt. Also please note that "ppl fill"
or "ppl plot" is needed after a fill or plot command only if the fill or plot
command has the /SET_UP qualifier.
Please have a look at the attached file (modified version of your script;
soi.jnl).
Hope This Helps
With Regards
Jaison
On Wed, 12 Jan 2005, Hemerson Tonin wrote:
>
> I have a journal (below) that uses ppl commands and fill_between.jnl,
> basically, my intend is reproduce a figure like SOI index ( see:
> http://www.pmel.noaa.gov/~kessler/ENSO/soi-1950-98.gif ) within my model
> running period.
>
> I removed all older metafiles; set mode meta, run the journal, it comes
> perfect on screen, but in the end of day, I've got 2 metafiles.
>
> One is metafile.plt and another one metafile.plt.~1~, resulting that, it is
> impossible to convert them (both ?!?!) to ps. It seems that the journal is
> spliting the plot in two.
>
>
> Any ideas ?
>
> Thank's in advanced
>
> Hemer
> (ferret 5.80 on linux)
>
>
>
>
> my journal
> _________________________________________________________________
>
> use my_soi.nc
> let/title="Southern Oscillation Index"/unit="hPa: 1000hPa subtracted"
> temp=soi[l=@sbx:12]
>
> let el_nino=if temp le 0 then temp else 1/0
> let la_nina=if temp ge 0 then temp else 1/0
>
> set re/t="01-jan-1986":"31-aug-2002"
>
> !-----------------------------------------------------------------------------------------------
> ! this is a little trick to put time axis labels either below and above the
> plot
> !-----------------------------------------------------------------------------------------------
>
> define viewport/xlim=0:1/ylim=0:1 view1
> define viewport/xlim=0:1/ylim=0:1 view2
>
> set view view1
> plot/colour=white/nolabels/vlim=-3.5:3.5:1 temp
>
> set view view2
> plot/colour=white/nolabels/vlim=-3.5:3.5:1 temp
> ppl txlabp, 1
> ppl plot
>
> !-----------------------------------------------------------------------------------------------
> ! end of trick
> !-----------------------------------------------------------------------------------------------
>
> ppl ylab "hPa: 1000 hPa subtracted"
> ppl plot
>
> go fill_between poly/ov/pal=red/nolabels el_nino time
> ! time is the original axis of the variable soi
>
> go fill_between poly/ov/pal=blue/nolabels la_nina time
> plot/ov/colour=black/nolabels temp
>
> label 15000 3 -1 0 .15 Cool (La Nina)
> label 38600 3.13 -1 0 .1 @MA45
>
> label 15000 -3.1 -1 0 .15 Warm (El Nino)
> label 40000 -2.96 -1 0 .1 @MA45
>
> label 84000 4.2 0 0 .2 "Southern Oscillation Index"
>
> ____________________________________________________________________________
>
>
> Tonin, H. E.
> School of Chemistry, Physics and Earth Sciences
> Flinders University
> Adelaide - Australia
--
___________________________________________________
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
___________________________________________________
\ cancel mode verify
sp rm -f metafile* ! remove all the previous versions of metafile
set mode meta
use my_soi.nc
let/title="Southern Oscillation Index"/unit="hPa: 1000hPa subtracted" temp=soi[l=@sbx:12]
let el_nino=if temp le 0 then temp else 1/0
let la_nina=if temp ge 0 then temp else 1/0
set reg/t="01-jan-1986":"31-aug-2002"
!----------------------------------------------------------------------
! this is a little trick to put time axis labels either below and above the plot
!----------------------------------------------------------------------
define viewport/xlim=0:1/ylim=0:1 view1
define viewport/xlim=0:1/ylim=0:1 view2
set view view1
plot/colour=white/nolabels/vlim=-3.5:3.5:1 temp
set view view2
plot/colour=white/nolabels/vlim=-3.5:3.5:1/set temp
ppl txlabp, 1
ppl ylab "hPa: 1000 hPa subtracted"
ppl plot
!----------------------------------------------------------------------
! end of trick
!----------------------------------------------------------------------
go fill_between poly/ov/pal=red/nolabels el_nino time
! time is the original axis of the variable soi
go fill_between poly/ov/pal=blue/nolabels la_nina time
plot/ov/colour=black/nolabels temp
label 15000 3 -1 0 .15 Cool (La Nina)
label 38600 3.13 -1 0 .1 @MA45
label 15000 -3.1 -1 0 .15 Warm (El Nino)
label 40000 -2.96 -1 0 .1 @MA45
label 84000 4.2 0 0 .2 "Southern Oscillation Index"
! create the output ps/pdf file
cancel mode meta ; ppl clsplt
sp rm -f soi.p* ! to remove earlier versions of soi.ps & soi.pdf
sp Fprint -l cps -R -o soi.ps metafile.plt
sp ps2pdf soi.ps
sp rm -f metafile*
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement