Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fixes/workaround for upcoming (> v3.4.3) ggplot2 release #2301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 11, 2023
Merged
Prev Previous commit
Next Next commit
Simplify scale type detection logic (since new approach works with ol…
…d versions; use it across the board)
  • Loading branch information
cpsievert committed Oct 10, 2023
commit 7f2d96f5a1302c2b3c49687cdeac3f89e1cd547f
10 changes: 4 additions & 6 deletions 10 R/ggplotly.R
Original file line number Diff line number Diff line change
Expand Up @@ -725,13 +725,11 @@ gg2list <- function(p, width = NULL, height = NULL,
call. = FALSE
)
}
# determine axis types (note: scale_name went away in ggplot2 v3.4.3)
# https://github.com/hadley/ggplot2/issues/1312
isDate <- isTRUE(sc$scale_name %in% c("date", "datetime")) ||
inherits(sc, c("ScaleContinuousDatetime", "ScaleContinuousDate"))

# determine axis types
isDate <- inherits(sc, c("ScaleContinuousDatetime", "ScaleContinuousDate"))
isDateType <- isDynamic && isDate
isDiscrete <- identical(sc$scale_name, "position_d") ||
inherits(sc, "ScaleDiscretePosition")
isDiscrete <- inherits(sc, "ScaleDiscretePosition")
isDiscreteType <- isDynamic && isDiscrete

# In 3.2.x .major disappeared in favor of break_positions()
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.