Skip to content

Make clipping configurable in coord_sf(). #2942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ This is a minor release and breaking changes have been kept to a minimum. End us
safer to feed data columns into `aes()` or into parameters of geoms or
stats. However, doing so remains discouraged (@clauswilke, #2694).

* `coord_sf()` now also understands the `clip` argument, just like the other
coords (@clauswilke, #2938).

* `fortify()` now displays a more informative error message for
`grouped_df()` objects when dplyr is not installed (@jimhester, #2822).

Expand Down
5 changes: 3 additions & 2 deletions R/sf.R
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ coord_sf <- function(xlim = NULL, ylim = NULL, expand = TRUE,
crs = NULL, datum = sf::st_crs(4326),
label_graticule = waiver(),
label_axes = waiver(),
ndiscr = 100, default = FALSE) {
ndiscr = 100, default = FALSE, clip = "on") {

if (is.waive(label_graticule) && is.waive(label_axes)) {
# if both `label_graticule` and `label_axes` are set to waive then we
Expand Down Expand Up @@ -830,7 +830,8 @@ coord_sf <- function(xlim = NULL, ylim = NULL, expand = TRUE,
label_graticule = label_graticule,
ndiscr = ndiscr,
expand = expand,
default = default
default = default,
clip = clip
)
}

Expand Down
12 changes: 11 additions & 1 deletion man/ggsf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.