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

Handle recent changes to ggplot2's plot_build() logic #2262

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 10 commits into from
May 5, 2023
Prev Previous commit
Next Next commit
Update test expectations
  • Loading branch information
cpsievert committed May 4, 2023
commit 98becaea5b15e7bc73e1819bead82e3ff227e75e
4 changes: 2 additions & 2 deletions 4 tests/testthat/test-cookbook-axes.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ test_that("factor levels determine tick order", {
bp.ylim.hide <- bp + ylim(5, 7.5)
test_that("ylim hides points", {
info <- expect_warning(expect_traces(bp.ylim.hide, 1, "ylim.hide"),
regexp = "non-finite values")
regexp = "non-finite")
})

bp.scale.hide <- bp + scale_y_continuous(limits = c(5, 7.5))
test_that("scale_y(limits) hides points", {
info <- expect_warning(expect_traces(bp.scale.hide, 1, "scale.hide"),
regexp = "non-finite values")
regexp = "non-finite")
expect_equivalent(range(info$layout$yaxis$tickvals), c(5, 7.5))
y <- unlist(lapply(info$data, "[[", "y"))
expect_true(all(5 <= y & y <= 7.5, na.rm = TRUE))
Expand Down
4 changes: 2 additions & 2 deletions 4 tests/testthat/test-ggplot-dynamicTicks.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ test_that("Categorical axis reflects custom scale mapping", {
scale_x_discrete(limits = lims)

expect_warning(p <- ggplotly(g, dynamicTicks = "x"),
regexp = "non-finite values")
regexp = "non-finite")

axisActual <- with(
p$x$layout$xaxis, list(type, tickmode, categoryorder, categoryarray)
Expand All @@ -49,7 +49,7 @@ test_that("Categorical axis reflects custom scale mapping", {
geom_bar() +
scale_x_discrete(limits = lims, labels = labs)
expect_warning(p <- ggplotly(g, dynamicTicks = "x"),
regexp = "non-finite values")
regexp = "non-finite")

axisActual <- with(
p$x$layout$xaxis, list(type, tickmode, categoryorder, categoryarray)
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.