An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20050531/bcbd3a7e/attachment.pl
labels on map
2 messages · jose silva, Duncan Murdoch
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