Re: Re: [R] labels on map

From: jose silva <>
Date: Tue 31 May 2005 - 10:47:54 EST

thanks Duncan, thats what I was looking for :)

p.s. xlab in map() gives the same result as in axis()

j. silva

jose silva wrote:
> dear all:
> Im trying to obtain maps on R, under mapdata library, but I cannot define the labels.
> Here is an example:
> library(mapdata)
> map("worldHires", c("portugal","spain"),ylim=c(34,46),xlim=c(-14,3.5))
> axis(1,at=seq(-12,3,3))
> axis(2)
> when I try the parameter xlab or ylab in axis, i get:
> parameter "ylab" couldn't be set in high-level plot() function
> any suggestion? thanks in advance for your always useful advices

Despite their names, x and y axis labels aren't really part of the axis, they're titles in the margins of the plot. Use the title() function to set them.

You could probably also set them in map(), but I don't have it installed to check. mtext() is another general purpose way to put text in the margins.

Duncan Murdoch

        [[alternative HTML version deleted]] mailing list PLEASE do read the posting guide! Received on Tue May 31 10:52:40 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:16 EST