How to hide tool bar in plotly

Hi All,

I would like to know how to hide tool bar in Plotly diagram.

I was using below code but looks like something is missing here.

library(plotly)

v_result <- plot_ly(x = c(1,2,3,4), y = c(1, 3, 5, 7))
v_result <- v_result %>% layout(xaxis = x , yaxis = y)
%>% config(displayModeBar = FALSE)

v_result

Please help.

Thanks,
Mahesh

Your code did not work for me as provided because the layout function call required variables that didnt exist. once I removed that it worked.

library(plotly)
library(tidyverse)
v_result <- plot_ly(x = c(1,2,3,4), y = c(1, 3, 5, 7))
v_result <- v_result %>% config(displayModeBar = FALSE)
v_result

Thanks for the response it worked now.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.