Skip to content
Prev 10408 / 29559 Next

readShapePoly function and putting text on map

Thanks, Roger,

Got it to work. 

Got another question, is it possible to "enlarge" the map either using the plot function, or another function?

Cheers

Kevin 

sent from my hTC Desire handset



----- Reply message -----
From: "Roger Bivand" <Roger.Bivand at nhh.no>
Date: Thu, Dec 16, 2010 9:22 pm
Subject: [R-sig-Geo] readShapePoly function and putting text on map
To: "Wang, Kevin (SYD)" <kevinwang at kpmg.com.au>
Cc: "r-sig-geo at r-project.org" <r-sig-geo at r-project.org>, "Kevin Wang" <wang.kevin at gmail.com>
On Thu, 16 Dec 2010, Wang, Kevin (SYD) wrote:

            
Maybe:
         lga1_7 <- lga1[lga1$STATE_CODE == 7,]
         plot(lga1_7, border="blue")
         title(main = "NT LGA Division")
         text(coordinates(lga1_7),
             labels = as.character(lga1_7$LGA_NAME10), cex=0.6)

(above you could have said labels=rownames(lga1)[lga1$STATE_CODE == 7], 
the example on the help hasn't been updated, but will be now - thanks 
for reminding me).

Roger