[R] overlaying text() onto image() or filled.contour()

Paul Murrell p.murrell at auckland.ac.nz
Tue Jun 8 22:11:52 CEST 2004


Hi


Laura Quinn wrote:
> I am trying to add some markers onto a contour map image I have created,
> by using the text() function when I have already produced the map using
> either image() or filled.contour(). For some reason the points appear to
> be shifted considerably to the right of where they should be appearing,
> despite me using exactly the same co-ordinate systems for both. This
> offset is also dependent on the aspect ratio I use.


See example three in help(filled.contour) - you can use the plot.axes 
argument.


> The map I am looking at is around 3.5x larger in height than width and I
> need to maximise this in an X window. If I simply use asp=1 the map is
> pretty unreadable, is there a way I can drastically reduce the margin
> sizes perhaps? The par() commands I at ve tried haven;t made an appreciable
> difference - and i'M still very puzzled as to why my data markers are
> appearing in the wrong place...any suggestions?


par(mar=whatever) has some effect - although par("mar")[4] does get 
overridden to make a space between the plot and the legend.

Paul
-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/




More information about the R-help mailing list