The size of the card with lat / long 38.31536111, -76.55011111 differs from the card with lat / long 59.5624775, -139.7410994 (drawing points on the map)
saving it with png ()
How to keep the same size? height and width is not enough?
EDIT: full code
library(maps) library(ggplot2) data <- read.csv("data.csv", header=TRUE) lat = data$lat long = data$long world<-map_data('usa') sf<-data.frame(long=long,lat=lat) p <- ggplot(height=600, width=800) + geom_polygon( data=world, aes(x=long, y=lat,group=group)) p <- p + geom_point(data=sf,aes(long,lat),colour="white",size=1) p
data file:
"lat","long" 59.5624775,-139.7410994 42.38748056,-94.61803333
If I delete the first line in the data file, the map size is different (larger) than with both lines
user187809
source share