[S] image.legend - solution

Laura Richards (l.richards@niwa.cri.nz)
Fri, 5 Jun 1998 16:51:33 1200


Many thanks to those who replied to my message back in April re:
problems with using image.legend in a multiple plot layout. It seems
this is a common difficulty, so here's the easy solution (credit to
Anne York and Jean Adams)...

# first call to 'image'
image(interp.temp, xlab = "Latitude, deg S", ylab = "Depth, m",
ylim = c(-130, 0), main="Temperature")
# next set plot position in layout
par(mfg=c(1,1,3,2))
# now can call 'image.legend'
image.legend(interp.temp$z, size=c(1, 0.1), hor=T)...

The important line was to use 'mfg' to state which plot of the 3x2
layout I wanted to place the legend with. This was the step that I
had missed.

Cheers,
Laura

Laura Richards
Biological oceanography, Fisheries Division
National Institute of Water and Atmospheric Research
P.O. Box 14-901, Kilbirnie, Wellington, New Zealand
Tel. +64-4-386-0300/Fax. +64-4-386-0574
**************************************************
"A journey of a thousand miles begins with a single step"
-Lao Tsu
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news