Skip to content

Commit 45168b6

Browse files
thomasp85hadley
authored andcommitted
Change all default_aes alpha from NA to 1 (#2559)
1 parent 756dfa5 commit 45168b6

28 files changed

+29
-29
lines changed

R/geom-abline.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ GeomAbline <- ggproto("GeomAbline", Geom,
121121
GeomSegment$draw_panel(unique(data), panel_params, coord)
122122
},
123123

124-
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = NA),
124+
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = 1),
125125
required_aes = c("slope", "intercept"),
126126

127127
draw_key = draw_key_abline

R/geom-boxplot.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ GeomBoxplot <- ggproto("GeomBoxplot", Geom,
247247
draw_key = draw_key_boxplot,
248248

249249
default_aes = aes(weight = 1, colour = "grey20", fill = "white", size = 0.5,
250-
alpha = NA, shape = 19, linetype = "solid"),
250+
alpha = 1, shape = 19, linetype = "solid"),
251251

252252
required_aes = c("x", "lower", "upper", "middle", "ymin", "ymax")
253253
)

R/geom-contour.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,5 @@ geom_contour <- function(mapping = NULL, data = NULL,
7474
#' @include geom-path.r
7575
GeomContour <- ggproto("GeomContour", GeomPath,
7676
default_aes = aes(weight = 1, colour = "#3366FF", size = 0.5, linetype = 1,
77-
alpha = NA)
77+
alpha = 1)
7878
)

R/geom-crossbar.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ GeomCrossbar <- ggproto("GeomCrossbar", Geom,
3333
},
3434

3535
default_aes = aes(colour = "black", fill = NA, size = 0.5, linetype = 1,
36-
alpha = NA),
36+
alpha = 1),
3737

3838
required_aes = c("x", "y", "ymin", "ymax"),
3939

R/geom-curve.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ geom_curve <- function(mapping = NULL, data = NULL,
4040
#' @usage NULL
4141
#' @export
4242
GeomCurve <- ggproto("GeomCurve", GeomSegment,
43-
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = NA),
43+
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = 1),
4444
draw_panel = function(data, panel_params, coord, curvature = 0.5, angle = 90,
4545
ncp = 5, arrow = NULL, arrow.fill, lineend = "butt", na.rm = FALSE) {
4646

R/geom-density.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ geom_density <- function(mapping = NULL, data = NULL,
7474
#' @include geom-ribbon.r
7575
GeomDensity <- ggproto("GeomDensity", GeomArea,
7676
default_aes = defaults(
77-
aes(fill = NA, weight = 1, colour = "black", alpha = NA),
77+
aes(fill = NA, weight = 1, colour = "black", alpha = 1),
7878
GeomArea$default_aes
7979
)
8080
)

R/geom-density2d.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,5 @@ geom_density2d <- geom_density_2d
7373
#' @usage NULL
7474
#' @export
7575
GeomDensity2d <- ggproto("GeomDensity2d", GeomPath,
76-
default_aes = aes(colour = "#3366FF", size = 0.5, linetype = 1, alpha = NA)
76+
default_aes = aes(colour = "#3366FF", size = 0.5, linetype = 1, alpha = 1)
7777
)

R/geom-dotplot.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ GeomDotplot <- ggproto("GeomDotplot", Geom,
175175
required_aes = c("x", "y"),
176176
non_missing_aes = c("size", "shape"),
177177

178-
default_aes = aes(colour = "black", fill = "black", alpha = NA),
178+
default_aes = aes(colour = "black", fill = "black", alpha = 1),
179179

180180
setup_data = function(data, params) {
181181
data$width <- data$width %||%

R/geom-errorbar.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ geom_errorbar <- function(mapping = NULL, data = NULL,
2727
#' @export
2828
GeomErrorbar <- ggproto("GeomErrorbar", Geom,
2929
default_aes = aes(colour = "black", size = 0.5, linetype = 1, width = 0.5,
30-
alpha = NA),
30+
alpha = 1),
3131

3232
draw_key = draw_key_path,
3333

R/geom-errorbarh.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ geom_errorbarh <- function(mapping = NULL, data = NULL,
4949
#' @export
5050
GeomErrorbarh <- ggproto("GeomErrorbarh", Geom,
5151
default_aes = aes(colour = "black", size = 0.5, linetype = 1, height = 0.5,
52-
alpha = NA),
52+
alpha = 1),
5353

5454
draw_key = draw_key_path,
5555

R/geom-hex.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ GeomHex <- ggproto("GeomHex", Geom,
6868

6969
required_aes = c("x", "y"),
7070

71-
default_aes = aes(colour = NA, fill = "grey50", size = 0.5, alpha = NA),
71+
default_aes = aes(colour = NA, fill = "grey50", size = 0.5, alpha = 1),
7272

7373
draw_key = draw_key_polygon
7474
)

R/geom-hline.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ GeomHline <- ggproto("GeomHline", Geom,
4747
GeomSegment$draw_panel(unique(data), panel_params, coord)
4848
},
4949

50-
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = NA),
50+
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = 1),
5151
required_aes = "yintercept",
5252

5353
draw_key = draw_key_path

R/geom-label.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ GeomLabel <- ggproto("GeomLabel", Geom,
5252

5353
default_aes = aes(
5454
colour = "black", fill = "white", size = 3.88, angle = 0,
55-
hjust = 0.5, vjust = 0.5, alpha = NA, family = "", fontface = 1,
55+
hjust = 0.5, vjust = 0.5, alpha = 1, family = "", fontface = 1,
5656
lineheight = 1.2
5757
),
5858

R/geom-linerange.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ geom_linerange <- function(mapping = NULL, data = NULL,
8383
#' @usage NULL
8484
#' @export
8585
GeomLinerange <- ggproto("GeomLinerange", Geom,
86-
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = NA),
86+
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = 1),
8787

8888
draw_key = draw_key_vpath,
8989

R/geom-path.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ geom_path <- function(mapping = NULL, data = NULL,
123123
GeomPath <- ggproto("GeomPath", Geom,
124124
required_aes = c("x", "y"),
125125

126-
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = NA),
126+
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = 1),
127127

128128
handle_na = function(data, params) {
129129
# Drop missing values at the start or end of a line - can't drop in the

R/geom-point.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ GeomPoint <- ggproto("GeomPoint", Geom,
122122
non_missing_aes = c("size", "shape", "colour"),
123123
default_aes = aes(
124124
shape = 19, colour = "black", size = 1.5, fill = NA,
125-
alpha = NA, stroke = 0.5
125+
alpha = 1, stroke = 0.5
126126
),
127127

128128
draw_panel = function(data, panel_params, coord, na.rm = FALSE) {

R/geom-pointrange.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ geom_pointrange <- function(mapping = NULL, data = NULL,
2929
#' @export
3030
GeomPointrange <- ggproto("GeomPointrange", Geom,
3131
default_aes = aes(colour = "black", size = 0.5, linetype = 1, shape = 19,
32-
fill = NA, alpha = NA, stroke = 1),
32+
fill = NA, alpha = 1, stroke = 1),
3333

3434
draw_key = draw_key_pointrange,
3535

R/geom-polygon.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ GeomPolygon <- ggproto("GeomPolygon", Geom,
106106
},
107107

108108
default_aes = aes(colour = "NA", fill = "grey20", size = 0.5, linetype = 1,
109-
alpha = NA),
109+
alpha = 1),
110110

111111
handle_na = function(data, params) {
112112
data

R/geom-raster.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ geom_raster <- function(mapping = NULL, data = NULL,
4444
#' @usage NULL
4545
#' @export
4646
GeomRaster <- ggproto("GeomRaster", Geom,
47-
default_aes = aes(fill = "grey20", alpha = NA),
47+
default_aes = aes(fill = "grey20", alpha = 1),
4848
non_missing_aes = "fill",
4949
required_aes = c("x", "y"),
5050

R/geom-rect.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ geom_rect <- function(mapping = NULL, data = NULL,
2727
#' @export
2828
GeomRect <- ggproto("GeomRect", Geom,
2929
default_aes = aes(colour = NA, fill = "grey35", size = 0.5, linetype = 1,
30-
alpha = NA),
30+
alpha = 1),
3131

3232
required_aes = c("xmin", "xmax", "ymin", "ymax"),
3333

R/geom-ribbon.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ geom_ribbon <- function(mapping = NULL, data = NULL,
5858
#' @export
5959
GeomRibbon <- ggproto("GeomRibbon", Geom,
6060
default_aes = aes(colour = NA, fill = "grey20", size = 0.5, linetype = 1,
61-
alpha = NA),
61+
alpha = 1),
6262

6363
required_aes = c("x", "ymin", "ymax"),
6464

@@ -132,7 +132,7 @@ geom_area <- function(mapping = NULL, data = NULL, stat = "identity",
132132
#' @export
133133
GeomArea <- ggproto("GeomArea", GeomRibbon,
134134
default_aes = aes(colour = NA, fill = "grey20", size = 0.5, linetype = 1,
135-
alpha = NA),
135+
alpha = 1),
136136

137137
required_aes = c("x", "y"),
138138

R/geom-rug.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ GeomRug <- ggproto("GeomRug", Geom,
106106
gTree(children = do.call("gList", rugs))
107107
},
108108

109-
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = NA),
109+
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = 1),
110110

111111
draw_key = draw_key_path
112112
)

R/geom-segment.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ geom_segment <- function(mapping = NULL, data = NULL,
101101
GeomSegment <- ggproto("GeomSegment", Geom,
102102
required_aes = c("x", "y", "xend", "yend"),
103103
non_missing_aes = c("linetype", "size", "shape"),
104-
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = NA),
104+
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = 1),
105105

106106
draw_panel = function(data, panel_params, coord, arrow = NULL, arrow.fill = NULL,
107107
lineend = "butt", linejoin = "round", na.rm = FALSE) {

R/geom-text.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ GeomText <- ggproto("GeomText", Geom,
169169

170170
default_aes = aes(
171171
colour = "black", size = 3.88, angle = 0, hjust = 0.5,
172-
vjust = 0.5, alpha = NA, family = "", fontface = 1, lineheight = 1.2
172+
vjust = 0.5, alpha = 1, family = "", fontface = 1, lineheight = 1.2
173173
),
174174

175175
draw_panel = function(data, panel_params, coord, parse = FALSE,

R/geom-tile.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ GeomTile <- ggproto("GeomTile", GeomRect,
9494
},
9595

9696
default_aes = aes(fill = "grey20", colour = NA, size = 0.1, linetype = 1,
97-
alpha = NA, width = NA, height = NA),
97+
alpha = 1, width = NA, height = NA),
9898

9999
required_aes = c("x", "y"),
100100

R/geom-violin.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ GeomViolin <- ggproto("GeomViolin", Geom,
155155
draw_key = draw_key_polygon,
156156

157157
default_aes = aes(weight = 1, colour = "grey20", fill = "white", size = 0.5,
158-
alpha = NA, linetype = "solid"),
158+
alpha = 1, linetype = "solid"),
159159

160160
required_aes = c("x", "y")
161161
)

R/geom-vline.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ GeomVline <- ggproto("GeomVline", Geom,
4747
GeomSegment$draw_panel(unique(data), panel_params, coord)
4848
},
4949

50-
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = NA),
50+
default_aes = aes(colour = "black", size = 0.5, linetype = 1, alpha = 1),
5151
required_aes = "xintercept",
5252

5353
draw_key = draw_key_vline

R/sf.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ GeomSf <- ggproto("GeomSf", Geom,
147147
fill = NULL,
148148
size = NULL,
149149
linetype = 1,
150-
alpha = NA,
150+
alpha = 1,
151151
stroke = 0.5
152152
),
153153

0 commit comments

Comments
 (0)