Skip to content

Commit 5269673

Browse files
committed
add warning about height/width
1 parent 35ab305 commit 5269673

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

R/layout.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ layout.matrix <- function(p, ..., data = NULL) {
2222
layout.plotly <- function(p, ..., data = NULL) {
2323
p <- add_data(p, data)
2424
attrs <- list(...)
25+
if (!is.null(attrs[["height"]]) || !is.null(attrs[["width"]])) {
26+
warning("Specifying width/height in layout() is now deprecated.\n",
27+
"Please specify in ggplotly() or plot_ly()", call. = FALSE)
28+
}
2529
# similar to add_trace()
2630
p$x$layoutAttrs <- c(
2731
p$x$layoutAttrs %||% list(),

0 commit comments

Comments
 (0)