[Thread Prev][Thread Next][Index]
Re: [ferret_users] Use of legline.jnl on time axis
Hi -
The legline script uses the command ALINE which is notorious for being
difficult to get to work in cases other than simple x-y plots. Time or
depth axes give it trouble. One fix would be to rewrite legline.jnl to
use PLOT/VS/LINE/OVER instead of the ALINE call (and then you could use
/COLOR= and pass in color names rather than numbers.)
Another way to put anything you want on a plot page is to use the trick
of making a new little viewport in the location where you want it, and
draw the object there. Here we'd make a small viewport in one corner of
the plot (viewports are always sized relative to the whole plot page).
Draw a dummy plot in that viewport and then call legline.jnl to draw the
legend. Here is an example.
! Make the line plot in a viewport
use coads_climatology
set view full
plot/y=0/vlim=22:30/nokey/title="SST" sst[X=130], sst[X=160],
sst[X=190], sst[X=220]
! Define a viewport in the lower left corner of the plot box.
let xlo = ($ppl$xorg)/($ppl$width)
let ylo = ($ppl$yorg)/($ppl$height)
def view/axes/x=`xlo`:`xlo+0.25`/y=`ylo`:`ylo+0.2` legnd
! Make a dummy plot here. It could be a line plot whose limits are
outside the limits set by /HLIM
! and /VLIM, or a shade plot like this that takes up the whole
viewport. A shade plot will overwrite
! anything that is already on the page. Use /palette=white if you
dont want it to stand out as much.
set view legnd
shade/noax/nolab/nokey/i=1:100/j=1:100/hlim=0:100/vlim=0:100/pal=grey_light
i+j
go legline 10 20 80 1 .14 "X=130"
go legline 10 20 60 2 .14 "X=160"
go legline 10 20 40 3 .14 "X=190"
go legline 10 20 20 4 .14 "X=220"
frame/file=legnd.gif
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement