Skip to content

Commit 43eafa8

Browse files
Remove lineend and fix rect_to_poly()
1 parent fbc0500 commit 43eafa8

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

R/geom-rect.r

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
geom_rect <- function(mapping = NULL, data = NULL,
44
stat = "identity", position = "identity",
55
...,
6-
lineend = "square",
76
linejoin = "mitre",
87
na.rm = FALSE,
98
show.legend = NA,
@@ -17,7 +16,6 @@ geom_rect <- function(mapping = NULL, data = NULL,
1716
show.legend = show.legend,
1817
inherit.aes = inherit.aes,
1918
params = list(
20-
lineend = lineend,
2119
linejoin = linejoin,
2220
na.rm = na.rm,
2321
...
@@ -35,8 +33,7 @@ GeomRect <- ggproto("GeomRect", Geom,
3533

3634
required_aes = c("xmin", "xmax", "ymin", "ymax"),
3735

38-
draw_panel = function(self, data, panel_params, coord,
39-
lineend = "square", linejoin = "mitre") {
36+
draw_panel = function(self, data, panel_params, coord, linejoin = "mitre") {
4037
if (!coord$is_linear()) {
4138
aesthetics <- setdiff(
4239
names(data), c("x", "y", "xmin", "xmax", "ymin", "ymax")
@@ -63,7 +60,6 @@ GeomRect <- ggproto("GeomRect", Geom,
6360
fill = alpha(coords$fill, coords$alpha),
6461
lwd = coords$size * .pt,
6562
lty = coords$linetype,
66-
lineend = lineend,
6763
linejoin = linejoin
6864
)
6965
))
@@ -80,7 +76,7 @@ GeomRect <- ggproto("GeomRect", Geom,
8076
# @keyword internal
8177
rect_to_poly <- function(xmin, xmax, ymin, ymax) {
8278
new_data_frame(list(
83-
y = c(ymax, ymax, ymin, ymin, ymax),
84-
x = c(xmin, xmax, xmax, xmin, xmin)
79+
y = c(ymax, ymax, ymin, ymin),
80+
x = c(xmin, xmax, xmax, xmin)
8581
))
8682
}

R/geom-tile.r

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
geom_tile <- function(mapping = NULL, data = NULL,
5959
stat = "identity", position = "identity",
6060
...,
61-
lineend = "square",
6261
linejoin = "mitre",
6362
na.rm = FALSE,
6463
show.legend = NA,
@@ -72,7 +71,6 @@ geom_tile <- function(mapping = NULL, data = NULL,
7271
show.legend = show.legend,
7372
inherit.aes = inherit.aes,
7473
params = list(
75-
lineend = lineend,
7674
linejoin = linejoin,
7775
na.rm = na.rm,
7876
...

man/geom_tile.Rd

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)