Displaying 1 result from an estimated 1 matches for "michigan_map".
2012 Mar 20
1
passing xlim to coord_map in ggplot2
...9;, xlim =
c(-86, -84))
This generates the following error:
*Error in unit(x, default.units) : 'x' and 'units' must have length > 0*
#Where tank_trunc is a data.frame with two columns, 'lon' and 'lat'
containing point coordinates in storage mode 'double'.
michigan_map.df <- map_data('county', 'michigan')
ggplot() + geom_point(aes(lon, lat), data = tank_trunc, na.rm = T) +
geom_path(aes(long, lat, group = group), data = michigan_map.df) +
coord_map('gilbert', xlim = c(-88, -82))
I thought at first maybe the overlay of one layer on anot...