Hello. I am having difficulty adding labels to a projected plot.

library(calibrate)
library(rgdal)

citynames <- c("Ahuachapán", "Sensuntepeque", "Chalatenango", "Cojutepeque", "Santa Tecla", "Zacatecoluca", "La Unión", "San Francisco Gotera", "San Miguel", "San Salvador", "San Vicente","Santa Ana", "Sonsonate", "Usulután)

cityx <- c(-89.8450,-88.6300,-89.0940,-88.9333,-89.2900,-88.8680,-87.8390,-88.1000,-88.1833,-89.2030,-88.7850,-89.5527,-89.7300,-88.4320)
cityy <- c(13.9190,13.8800,14.0720,13.7167,13.6740,13.5080,13.3320,13.7000,13.4833,13.7100,13.6410,13.9962,13.7200,13.3460)

coords <- cbind(cityx,cityy)

plot(coords, xlab="", ylab="Latitude", main="El Salvador")
textxy(cityx, cityy,citynames)
#this works as expected

coords2 <- project(coords, "+proj=utm +zone=16 ellps=WGS84")

plot.new()
plot(coords2, xlab="Easting", ylab="Northing", main="El Salvador")
textxy(cityx, cityy,citynames)
#this plot has no labels

Thanks,

Francis P. Boscoe, Ph.D.
Research Scientist
New York State Cancer Registry
150 Broadway, Suite 361
Albany, NY 12204

(518) 474-2255
Fax 473-6789


	[[alternative HTML version deleted]]

