I am trying to create an empty plotly with a message telling why the plot is empty as a title. I would like to center the message both horizontally and vertically.
I am missing the vertical center :
empty_plot <- function(title = NULL){
p <- plotly_empty(type = "scatter", mode = "markers") %>%
config(
displayModeBar = FALSE
) %>%
layout(
title = title
)
return(p)
}
empty_plot("Why it is empty")