[R-sig-Geo] aligning tick maks with coord_map and ggplot

Andy Bunn Andy.Bunn at wwu.edu
Wed Nov 15 20:58:33 CET 2017


Wonderful thanks!

From: zuzana zajkova <zuzulaz at gmail.com>
Date: Tuesday, November 14, 2017 at 2:45 AM
To: Andy Bunn <Andy.Bunn at wwu.edu>
Cc: R-sig-Geo <r-sig-geo at r-project.org>
Subject: Re: [R-sig-Geo] aligning tick maks with coord_map and ggplot

library(maps)
world1 <- sf::st_as_sf(map('world', plot = FALSE, fill = TRUE))
ggplot() + geom_sf(data = world1)

Projected:
ggplot() +
  geom_sf(data = world1, colour="gray50", fill="gray50") +
  coord_sf(crs="+proj=ortho +y_0=0 +lon_0=-110 +lat_0=40", xlim=c(-2000000, 500000), ylim=c(-1800000, 2000000)) +
  scale_x_continuous(breaks=seq(-140, -100, 10)) +
  scale_y_continuous(breaks=seq(10, 60, 10))

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list