-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Update geoms to more closely match ggplot2 v3.5.1
* Internal geom code has been updated to more closely match ggplot2 v3.5.1 equivalents when viewed with vimdiff algorithms * Geoms now more consistently expose the `lineend` and `linejoin` parameters. This matches a similar upstream change in ggplot2 3.4.0. * `geom_area_pattern()` and `geom_ribbon_pattern()` now accept `outline.type = "lower"` and `outline.type = "full"`. `geom_density_pattern()` now exposes the `outline.type` parameter. * `geom_boxplot_pattern()` now accept the `outliers` and `staplewidth` parameters. The `outliers` and `staplewidth` parameters were added to `geom_boxplot()` in ggplot2 3.5.0. * `geom_sf_pattern()` now accepts the `arrow` parameter. The `arrow` parameter was added to `geom_sf()` in ggplot2 3.5.0. * `geom_violin_pattern()` now accepts the `bounds` parameter. The `bounds` parameter was added to `geom_violin()` in ggplot2 3.5.0. BREAKING CHANGES: * `outline.type = "legacy"` has been removed in `geom_area_pattern()` and `geom_ribbon_pattern()`. `outline.type = "legacy"` was deprecated with ggpattern 0.1.0 (2020-04-01). closes #94
- Loading branch information
Showing
66 changed files
with
1,026 additions
and
1,325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Package: ggpattern | ||
Type: Package | ||
Title: 'ggplot2' Pattern Geoms | ||
Version: 1.1.0-7 | ||
Version: 1.1.0-8 | ||
Authors@R: c(person("Mike", "FC", role = "aut"), | ||
person("Trevor L.", "Davis", role = c("aut", "cre"), | ||
email = "[email protected]", | ||
|
@@ -15,13 +15,15 @@ Encoding: UTF-8 | |
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.3.1 | ||
Imports: | ||
ggplot2 (>= 3.5.0), | ||
cli, | ||
ggplot2 (>= 3.5.1), | ||
glue, | ||
grid, | ||
gridpattern (>= 1.2.0-4), | ||
lifecycle, | ||
rlang, | ||
rlang (>= 1.1.3), | ||
scales, | ||
vctrs | ||
Suggests: | ||
ambient, | ||
dplyr, | ||
|
@@ -47,7 +49,6 @@ Collate: | |
'aaa-ggplot2-scale-manual.R' | ||
'aaa-ggplot2-utilities-grid.R' | ||
'aaa-ggplot2-utilities.R' | ||
'aab-utils.R' | ||
'geom-.R' | ||
'geom-rect.R' | ||
'geom-bar.R' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,5 @@ | ||
|
||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
# This file was copied (mostly untouched) from ggplot2 v3.3.0.9000 | ||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
# Fast data.frame constructor and indexing | ||
# No checking, recycling etc. unless asked for | ||
new_data_frame <- function(x = list(), n = NULL) { | ||
if (length(x) != 0 && is.null(names(x))) { | ||
abort("Elements must be named") | ||
} | ||
lengths <- vapply(x, length, integer(1)) | ||
if (is.null(n)) { | ||
n <- if (length(x) == 0 || min(lengths) == 0) 0 else max(lengths) | ||
} | ||
for (i in seq_along(x)) { | ||
if (lengths[i] == n) next | ||
if (lengths[i] != 1) { | ||
abort("Elements must equal the number of rows or 1") | ||
} | ||
x[[i]] <- rep(x[[i]], n) | ||
} | ||
|
||
class(x) <- "data.frame" | ||
|
||
attr(x, "row.names") <- .set_row_names(n) | ||
x | ||
} | ||
|
||
data_frame <- function(...) { | ||
new_data_frame(list(...)) | ||
} | ||
|
||
# data.frame <- function(...) { | ||
# abort(glue(" | ||
# Please use `data_frame()` or `new_data_frame()` instead of `data.frame()` for better performance. | ||
# See the vignette 'ggplot2 internal programming guidelines' for details. | ||
# ")) | ||
# } | ||
|
||
split_matrix <- function(x, col_names = colnames(x)) { | ||
force(col_names) | ||
x <- lapply(seq_len(ncol(x)), function(i) x[, i]) | ||
if (!is.null(col_names)) names(x) <- col_names | ||
x | ||
} | ||
|
||
mat_2_df <- function(x, col_names = colnames(x)) { | ||
new_data_frame(split_matrix(x, col_names)) | ||
} | ||
|
||
df_col <- function(x, name) .subset2(x, name) | ||
|
||
df_rows <- function(x, i) { | ||
new_data_frame(lapply(x, `[`, i = i)) | ||
} | ||
|
||
# More performant modifyList without recursion | ||
modify_list <- function(old, new) { | ||
for (i in names(new)) old[[i]] <- new[[i]] | ||
old | ||
} | ||
# modifyList <- function(...) { | ||
# abort(glue(" | ||
# Please use `modify_list()` instead of `modifyList()` for better performance. | ||
# See the vignette 'ggplot2 internal programming guidelines' for details. | ||
# ")) | ||
# } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.