Cleaning up a map using geom_tile
Get boundaries to come through on states
I\'m trying to smooth out some
The previous answer was prbly not optimal (or accurate) for your needs. This is a bit of a hack:
gg <- ggplot()
gg <- gg + geom_polygon(data=subset(map_data("state"), region %in% regions),
aes(x=long, y=lat, group=group))
gg <- gg + geom_point(data=PRISM_1895_db, aes(x=longitude, y=latitude, color=APPT),
size=5, alpha=1/15, shape=19)
gg <- gg + scale_color_gradient(low="#023858", high="#ece7f2")
gg <- gg + geom_polygon(data=subset(map_data("state"), region %in% regions),
aes(x=long, y=lat, group=group), color="white", fill=NA)
gg <- gg + coord_equal()
gg
that requires changing size
in geom_point
for larger plots, but you get a better gradient effect than the stat_summary2d
behavior and it's conveying the same information.
Another option would be to interpolate more APPT
values between the longitude & latitudes you have, then convert that to a more dense raster object and plot it with geom_raster
like in the example you provided.