Skip to content

Commit 01f0277

Browse files
clauswilkehadley
authored andcommitted
make clipping configurable in coord_sf(). Closes #2938. (#2942)
1 parent 3550772 commit 01f0277

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ This is a minor release and breaking changes have been kept to a minimum. End us
5353
safer to feed data columns into `aes()` or into parameters of geoms or
5454
stats. However, doing so remains discouraged (@clauswilke, #2694).
5555

56+
* `coord_sf()` now also understands the `clip` argument, just like the other
57+
coords (@clauswilke, #2938).
58+
5659
* `fortify()` now displays a more informative error message for
5760
`grouped_df()` objects when dplyr is not installed (@jimhester, #2822).
5861

R/sf.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ coord_sf <- function(xlim = NULL, ylim = NULL, expand = TRUE,
789789
crs = NULL, datum = sf::st_crs(4326),
790790
label_graticule = waiver(),
791791
label_axes = waiver(),
792-
ndiscr = 100, default = FALSE) {
792+
ndiscr = 100, default = FALSE, clip = "on") {
793793

794794
if (is.waive(label_graticule) && is.waive(label_axes)) {
795795
# if both `label_graticule` and `label_axes` are set to waive then we
@@ -830,7 +830,8 @@ coord_sf <- function(xlim = NULL, ylim = NULL, expand = TRUE,
830830
label_graticule = label_graticule,
831831
ndiscr = ndiscr,
832832
expand = expand,
833-
default = default
833+
default = default,
834+
clip = clip
834835
)
835836
}
836837

man/ggsf.Rd

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)