Skip to content

Commit 87c7ff6

Browse files
committed
Merge pull request #396 from ropensci/fix/axis-title
search for axis title in scene object. fixes #393
2 parents 7e26c0f + 2b94679 commit 87c7ff6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/plotly.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ axis_titles <- function(x, l) {
449449
scene <- if (isTRUE(d$type %in% c("scatter3d", "surface"))) TRUE else FALSE
450450
for (i in c("x", "y", "z")) {
451451
ax <- paste0(i, "axis")
452-
t <- x$layout[[ax]]$title
452+
t <- x$layout[[ax]]$title %||% x$layout$scene[[ax]]$title
453453
if (is.null(t)) {
454454
idx <- which(names(argz) %in% i)
455455
if (length(idx)) {

0 commit comments

Comments
 (0)