Skip to content

Commit

Permalink
use utils fill_alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Dec 17, 2024
1 parent 1e22ae8 commit 039afc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
9 changes: 1 addition & 8 deletions R/geom-pie.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,7 @@ GeomPie <- ggproto("GeomPie",
default.units = "native",
gp = gpar(
col = data$colour,
fill = try_fetch(
# for version >= 3.5.0
ggplot2::fill_alpha(data$fill, data$alpha),
error = function(cnd) {
# for version < 3.5.0
ggplot2::alpha(data$fill, data$alpha)
}
),
fill = fill_alpha(data$fill, data$alpha),
lwd = data$linewidth,
lty = data$linetype,
lineend = lineend,
Expand Down
9 changes: 1 addition & 8 deletions R/geom-tile3d.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,7 @@ GeomRect3d <- ggproto(
default.units = "native",
gp = gpar(
col = data$colour,
fill = try_fetch(
# for version >= 3.5.0
ggplot2::fill_alpha(data$fill, data$alpha),
error = function(cnd) {
# for version < 3.5.0
ggplot2::alpha(data$fill, data$alpha)
}
),
fill = fill_alpha(data$fill, data$alpha),
lwd = data$linewidth,
lty = data$linetype,
lineend = lineend,
Expand Down

0 comments on commit 039afc7

Please sign in to comment.