Skip to content

Commit 87ba6a8

Browse files
committed
don't show ticks by default
1 parent fe1b68b commit 87ba6a8

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ fit_bounds <- function(p) {
265265
yname <- sub("y", "yaxis", yid)
266266
# default to empty axes
267267
# TODO: is there a set of projections where it makes sense to show a cartesian grid?
268-
eaxis <- list(showticklabels = FALSE, showgrid = FALSE, zeroline = FALSE, title = "")
268+
eaxis <- list(showgrid = FALSE, zeroline = FALSE, title = "", ticks = "", showticklabels = FALSE)
269269
p$x$layout[[xname]] <- modify_list(eaxis, p$x$layout[[xname]])
270270
p$x$layout[[yname]] <- modify_list(eaxis, p$x$layout[[yname]])
271271
p$x$layout[[xname]]$scaleanchor <- yname

tests/testthat/test-plotly-sf.R

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,19 @@ test_that("plot_ly() defaults to blank axes", {
8989

9090
xaxis <- p$x$layout$xaxis
9191
yaxis <- p$x$layout$yaxis
92+
9293
expect_false(xaxis$showgrid)
93-
expect_false(xaxis$showticklabels)
94-
expect_false(xaxis$zeroline)
95-
expect_true(xaxis$title == "just a test")
9694
expect_false(yaxis$showgrid)
95+
96+
expect_false(xaxis$showticklabels)
9797
expect_false(yaxis$showticklabels)
98+
99+
expect_false(xaxis$zeroline)
98100
expect_false(yaxis$zeroline)
101+
102+
expect_true(xaxis$title == "just a test")
99103
expect_true(yaxis$title == "")
104+
105+
expect_true(yaxis$ticks == "")
106+
expect_true(yaxis$ticks == "")
100107
})

0 commit comments

Comments
 (0)