Skip to content

Commit cfc0728

Browse files
committed
Merge pull request #911 from seancarmody/sp_fortify_fix
Fix fortify-spatial namespace issue (#879)
2 parents ae175ae + 939c29b commit cfc0728

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ ggplot2 0.9.3.1.99
1212

1313
* `ggpcp()`, `ggfluctuation()`, `ggmissing()`, `ggstructure()`, and
1414
`ggorder()` are now defunct and have been removed.
15+
16+
* `fortify.SpatialPolygonsDataFrame()` now calls `polygons` without requiring the `sp` to be loaded first. Addresses issue #879 https://github.com/hadley/ggplot2/issues/879
1517

1618
* `aes()` no more treats variables like `a..x..b` as a calculated aesthetic
1719
(@krlmlr, #834).

R/fortify-spatial.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fortify.SpatialPolygonsDataFrame <- function(model, data, region = NULL, ...) {
2727
coords <- ldply(model@polygons,fortify)
2828
message("Regions defined for each Polygons")
2929
} else {
30-
cp <- polygons(model)
30+
cp <- sp::polygons(model)
3131
try_require("maptools")
3232

3333
# Union together all polygons that make up a region

0 commit comments

Comments
 (0)