Skip to content

Commit 13a6684

Browse files
committed
adapt to ggplot2/#6450
1 parent 57fe5c0 commit 13a6684

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/ggplotly.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,8 @@ gg2list <- function(p, width = NULL, height = NULL,
784784
# the logic here is similar to what p$coordinates$aspect() does,
785785
# but the ratio is scaled to the data range by plotly.js
786786
fixed_coords <- c("CoordSf", "CoordFixed", "CoordMap", "CoordQuickmap")
787-
if (inherits(p$coordinates, fixed_coords)) {
787+
is_fixed <- !is.null(p$coordinates$is_free())
788+
if (inherits(p$coordinates, fixed_coords) || is_fixed) {
788789
axisObj$scaleanchor <- anchor
789790
ratio <- p$coordinates$ratio %||% 1
790791
axisObj$scaleratio <- if (xy == "y") ratio else 1 / ratio

0 commit comments

Comments
 (0)