Hi Zack,

It would help a lot if you can give a reproducible example that
generates the error.

Best,
Ista

On Tue, Mar 20, 2012 at 3:05 PM, z2.0 <zack.abraham...@gmail.com> wrote:
> This works:
> michigan <- map_data('county', 'michigan')
> mich_points <- data.frame(x = rnorm(n = 200, median(michigan[,1]), 0.75), y
> = rnorm(n = 200, median(michigan[,2]), 0.75))
> ggplot() + geom_path(aes(long, lat, group = group), data = michigan) +
> geom_point(aes(x, y), data = mich_points) + coord_map('gilbert', 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))

______________________________________________
R-help@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.

Reply via email to