How to remove Mode Bar from a Plotly figure

Hello, I have tried the following code to remove mode bar from a plotly plot, but it didn’t work. Please inform how can I remove it.

Code is below

import plotly.graph_objects as go

fig = go.Figure()

config = {'displayModeBar': False}

        x=[1, 2, 3],
        y=[1, 3, 1]))

I tried your code in my environment (5.13.0 latest version). The mode bar is not showing correctly. What version are you currently using?

1 Like

Your code works for me as well, the ModeBar is turned off

1 Like

I am using the latest version (5.13.0 ) but Mode bar is not turned off. What else could be the reason?

@Doty @r-beginners Thank you for your reply. The code wasn’t working as I was running in jupyter notebook on vscode. The code worked on python file.