Skip to content

Commit 4b220b6

Browse files
committed
remove aspect ratio warning
1 parent 6e8ac77 commit 4b220b6

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

R/facet-.R

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -731,15 +731,6 @@ Facet <- ggproto("Facet", NULL,
731731
return(table)
732732
}
733733

734-
if (isTRUE(table$respect)) {
735-
args <- !c(is.null(new_widths), is.null(new_heights))
736-
args <- c("panel.widths", "panel.heights")[args]
737-
cli::cli_warn(
738-
"Aspect ratios are overruled by {.arg {args}} theme element{?s}."
739-
)
740-
table$respect <- FALSE
741-
}
742-
743734
rows <- panel_rows(table)
744735
cols <- panel_cols(table)
745736

tests/testthat/test-theme.R

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -717,13 +717,6 @@ test_that("panel.widths and panel.heights works with free-space panels", {
717717

718718
})
719719

720-
test_that("panel.widths and panel.heights appropriately warn about aspect override", {
721-
p <- ggplot(mpg, aes(displ, hwy)) +
722-
geom_point() +
723-
theme(aspect.ratio = 1, panel.widths = unit(4, "cm"))
724-
expect_warning(ggplotGrob(p), "Aspect ratios are overruled")
725-
})
726-
727720
test_that("margin_part() mechanics work as expected", {
728721

729722
t <- theme_gray() +

0 commit comments

Comments
 (0)