Skip to content

Commit 7ddb6d9

Browse files
authored
Fix #4927 (#4928)
1 parent 6a2bd14 commit 7ddb6d9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: NEWS.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ggplot2 (development version)
22

3+
* `geom_linerange()` now respects the `na.rm` argument (#4927, @thomasp85)
4+
35
* Improve the support for `guide_axis()` on `coord_trans()` (@yutannihilation, #3959)
46

57
* `geom_density()` and `stat_density()` now support `bounds` argument

Diff for: R/geom-linerange.r

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ GeomLinerange <- ggproto("GeomLinerange", Geom,
113113
data
114114
},
115115

116-
draw_panel = function(data, panel_params, coord, lineend = "butt", flipped_aes = FALSE) {
116+
draw_panel = function(data, panel_params, coord, lineend = "butt", flipped_aes = FALSE, na.rm = FALSE) {
117117
data <- flip_data(data, flipped_aes)
118118
data <- transform(data, xend = x, y = ymin, yend = ymax)
119119
data <- flip_data(data, flipped_aes)
120-
ggname("geom_linerange", GeomSegment$draw_panel(data, panel_params, coord, lineend = lineend))
120+
ggname("geom_linerange", GeomSegment$draw_panel(data, panel_params, coord, lineend = lineend, na.rm = na.rm))
121121
},
122122

123123
rename_size = TRUE

0 commit comments

Comments
 (0)