Skip to content

Commit bd5418f

Browse files
committed
simplify coord_fixed()
1 parent 8266af7 commit bd5418f

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

R/coord-fixed.R

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,8 @@
2222
#' p + coord_fixed(xlim = c(15, 30))
2323
#'
2424
#' # Resize the plot to see that the specified aspect ratio is maintained
25-
coord_fixed <- function(ratio = 1, xlim = NULL, ylim = NULL, expand = TRUE,
26-
clip = "on", reverse = "none") {
27-
check_coord_limits(xlim)
28-
check_coord_limits(ylim)
29-
ggproto(NULL, CoordFixed,
30-
limits = list(x = xlim, y = ylim),
31-
ratio = ratio,
32-
expand = expand,
33-
reverse = reverse,
34-
clip = clip
35-
)
25+
coord_fixed <- function(ratio = 1, ...) {
26+
coord_cartesian(ratio = ratio, ...)
3627
}
3728

3829
#' @export

0 commit comments

Comments
 (0)