Removing some tools

#1

Hi,

What am I doing wrong?

fig = go.Figure(data=data , layout=layout, modeBarButtonsToRemove= [ ‘select2d’ ] )
TypeError: init() got an unexpected keyword argument ‘modeBarButtonsToRemove’

regards

#2

the modeBarButtonsToRemove needs to be wrapped within config (see dcc.Graph config options)

fig = go.Figure(
    data=data , 
    layout=layout, 
    config = {'modeBarButtonsToRemove' : 'select2d' }
)
2 Likes