Skip to content

Commit

Permalink
Make no blending default
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhodge931 committed Nov 28, 2024
1 parent cd1ae34 commit d6d2035
Show file tree
Hide file tree
Showing 196 changed files with 25,859 additions and 121 deletions.
2 changes: 1 addition & 1 deletion R/gg_area.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ gg_area <- function(data = NULL,
stat = "align",
position = "stack",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_bar.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ gg_bar <- function(data = NULL,
stat = "count",
position = "stack",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_bin_2d.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ gg_bin_2d <- function(data = NULL,
stat = "bin2d",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
144 changes: 98 additions & 46 deletions R/gg_blanket.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ gg_blanket <- function(data = NULL,
stat = "identity",
position = "identity",
coord = NULL,
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down Expand Up @@ -132,7 +132,7 @@ gg_blanket <- function(data = NULL,
caption = NULL,
label_to_case = snakecase::to_sentence_case) {

suppressMessages(ggblend::blend(blend = blend))
options(ggblend.check_blend = FALSE)

##############################################################################
#quote
Expand Down Expand Up @@ -210,32 +210,58 @@ gg_blanket <- function(data = NULL,
if (stringr::str_detect(stat_name, "sf")) {
if (rlang::is_null(coord)) coord <- ggplot2::coord_sf(clip = "off")

plot <- plot +
ggplot2::layer_sf(
geom = geom,
stat = stat,
position = position,
mapping = ggplot2::aes(!!!mapping),
params = rlang::list2(...),
show.legend = show_legend,
# ) +
) |> ggblend::blend(blend = blend) +
coord
if (rlang::is_null(blend)) {
plot <- plot +
ggplot2::layer_sf(
geom = geom,
stat = stat,
position = position,
mapping = ggplot2::aes(!!!mapping),
params = rlang::list2(...),
show.legend = show_legend,
) +
coord
}
else {
plot <- plot +
ggplot2::layer_sf(
geom = geom,
stat = stat,
position = position,
mapping = ggplot2::aes(!!!mapping),
params = rlang::list2(...),
show.legend = show_legend,
) |> ggblend::blend(blend = blend) +
coord
}
}
else {
if (rlang::is_null(coord)) coord <- ggplot2::coord_cartesian(clip = "off")

plot <- plot +
ggplot2::layer(
geom = geom,
stat = stat,
position = position,
mapping = ggplot2::aes(!!!mapping),
params = rlang::list2(outlier.alpha = 1, ...),
show.legend = show_legend,
# ) +
) |> ggblend::blend(blend = blend) +
coord
if (rlang::is_null(blend)) {
plot <- plot +
ggplot2::layer(
geom = geom,
stat = stat,
position = position,
mapping = ggplot2::aes(!!!mapping),
params = rlang::list2(outlier.alpha = 1, ...),
show.legend = show_legend,
) +
coord
}
else {
plot <- plot +
ggplot2::layer(
geom = geom,
stat = stat,
position = position,
mapping = ggplot2::aes(!!!mapping),
params = rlang::list2(outlier.alpha = 1, ...),
show.legend = show_legend,
) |> ggblend::blend(blend = blend) +
coord
}
}

suppressMessages({
Expand Down Expand Up @@ -403,32 +429,58 @@ gg_blanket <- function(data = NULL,
if (stringr::str_detect(stat_name, "sf")) {
if (rlang::is_null(coord)) coord <- ggplot2::coord_sf(clip = "off")

plot <- plot +
ggplot2::layer_sf(
geom = geom,
stat = stat,
position = position,
mapping = ggplot2::aes(!!!mapping),
params = rlang::list2(...),
show.legend = show_legend,
# ) +
) |> ggblend::blend(blend = blend) +
coord
if (rlang::is_null(blend)) {
plot <- plot +
ggplot2::layer_sf(
geom = geom,
stat = stat,
position = position,
mapping = ggplot2::aes(!!!mapping),
params = rlang::list2(...),
show.legend = show_legend,
) +
coord
}
else {
plot <- plot +
ggplot2::layer_sf(
geom = geom,
stat = stat,
position = position,
mapping = ggplot2::aes(!!!mapping),
params = rlang::list2(...),
show.legend = show_legend,
) |> ggblend::blend(blend = blend) +
coord
}
}
else {
if (rlang::is_null(coord)) coord <- ggplot2::coord_cartesian(clip = "off")

plot <- plot +
ggplot2::layer(
geom = geom,
stat = stat,
position = position,
mapping = ggplot2::aes(!!!mapping),
params = rlang::list2(outlier.alpha = 1, ...),
show.legend = show_legend,
# ) +
) |> ggblend::blend(blend = blend) +
coord
if (rlang::is_null(blend)) {
plot <- plot +
ggplot2::layer(
geom = geom,
stat = stat,
position = position,
mapping = ggplot2::aes(!!!mapping),
params = rlang::list2(outlier.alpha = 1, ...),
show.legend = show_legend,
) +
coord
}
else {
plot <- plot +
ggplot2::layer(
geom = geom,
stat = stat,
position = position,
mapping = ggplot2::aes(!!!mapping),
params = rlang::list2(outlier.alpha = 1, ...),
show.legend = show_legend,
) |> ggblend::blend(blend = blend) +
coord
}
}

if (!rlang::is_null(x_expand_limits)) {
Expand Down
2 changes: 1 addition & 1 deletion R/gg_boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gg_boxplot <- function(data = NULL,
stat = "boxplot",
position = "dodge2",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_col.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ gg_col <- function(data = NULL,
stat = "identity",
position = "stack",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_contour.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ gg_contour <- function(data = NULL,
stat = "contour",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_contour_filled.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gg_contour_filled <- function(data = NULL,
stat = "contour_filled",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_crossbar.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ gg_crossbar <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_density.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ gg_density <- function(data = NULL,
stat = "density",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_density_2d.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ gg_density_2d <- function(data = NULL,
stat = "density_2d",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_density_2d_filled.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ gg_density_2d_filled <- function(data = NULL,
stat = "density_2d_filled",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_errorbar.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ gg_errorbar <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_freqpoly.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ gg_freqpoly <- function(data = NULL,
stat = "bin",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_function.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ gg_function <- function(data = NULL,
stat = "function",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_hex.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ gg_hex <- function(data = NULL,
stat = "binhex",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_histogram.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gg_histogram <- function(data = NULL,
stat = "bin",
position = "stack",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_jitter.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ gg_jitter <- function(data = NULL,
stat = "identity",
position = "jitter",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_label.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ gg_label <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_line.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gg_line <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_linerange.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ gg_linerange <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_path.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ gg_path <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_point.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gg_point <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_pointrange.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ gg_pointrange <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/gg_polygon.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ gg_polygon <- function(data = NULL,
stat = "identity",
position = "identity",
coord = ggplot2::coord_cartesian(clip = "off"),
mode = NULL, mode_orientation = NULL, blend = "over",
mode = NULL, mode_orientation = NULL, blend = NULL,
x = NULL,
xmin = NULL,
xmax = NULL,
Expand Down
Loading

0 comments on commit d6d2035

Please sign in to comment.