Plotly: Any way of hiding the mode bar

Created on 9 Feb 2016  路  7Comments  路  Source: ropensci/plotly

I see there is a displayModeBar: false in the plotly ref but I cannot find it in the r plotly reference docs

Most helpful comment

The following works for me. Hope this helps...

plot_ly(x = rnorm(1000), y = rnorm(1000), mode = "markers") %>% 
  layout(title = "Plot") %>% 
  config(displayModeBar = F)

Do checkout the package documentation on CRAN here.

All 7 comments

The following works for me. Hope this helps...

plot_ly(x = rnorm(1000), y = rnorm(1000), mode = "markers") %>% 
  layout(title = "Plot") %>% 
  config(displayModeBar = F)

Do checkout the package documentation on CRAN here.

I recently changed config() to accept arbitrary arguments and also link to the plotly.js source in the reference. That way we won't have to worry about syncing the documentation.

Thanks guys

Hey guys, I used the following code to hide the mode bar...

gg<-gg %>%
  config(displayModeBar = FALSE) %>%
  config(showLink = FALSE)

...and this worked just fine in my Rstudio viewer and when I save it as an html file but when I save it to my plotly account, the modebar appears again. This is also the case for when I embed the plot into html say on my personal website for example, any idea whats going on? Thanks!

This should be reopened, as it isn't working!

@firasm config(displayModeBar = FALSE) seems to be working for me in a Shiny app with:

plotly * 4.9.1 2019-11-07 [1] CRAN (R 3.6.0)

Could you share more about the situation where it is failing for you?

Sorry, should have added more info a month ago when I was fighting this problem.

I'll see if I can get a MWE for testing/debugging, but it works fine in Jupyterlab but upon deployment of the R app to heroku, the modebar was back.

Was this page helpful?
0 / 5 - 0 ratings