[R] Map Antarctica

Pascal Oettli kridox at ymail.com
Thu Jun 6 03:24:02 CEST 2013


Hi,

There is a problem with xlim and ylim.

map("worldHires","Antarctica",xlim=c(-180,180),ylim=c(-90,-60),col="gray90",fill=TRUE)


You also might have a look at "ggplot2"

library(ggplot2)
world <- map_data("world")
worldmap <- ggplot(world, aes(x=long, y=lat, group=group)) +
   geom_path() +
   scale_y_continuous(breaks=(-2:2) * 30) +
   scale_x_continuous(breaks=(-4:4) * 45)

worldmap + coord_map("ortho", orientation=c(-90, 0, 0))

Regards,
Pascal


On 05/06/13 22:00, ejb wrote:
> Hey, I'm new with R and I'm attempting to map and then plot points on a map
> of Antarctica with help from some code at the following link.  Link
> <http://www.molecularecologist.com/2012/09/making-maps-with-r/>
>
> After downloading the packages here is the code I used. I feel like the
> problem has to do with the coordinates since I get a very small image that
> appears to be only a small portion of the continent (I want the whole
> thing). Thanks in advance!
>
> library(maps)
> library(mapdata)
> map("worldHires","Antarctica",xlim=c(-90,-60),ylim=c(-180,180),col="gray90",fill=TRUE)
>
>
>
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Map-Antarctica-tp4668713.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list