Removing some tools

Hi,

What am I doing wrong?

fig = go.Figure(data=data , layout=layout, modeBarButtonsToRemove= [ ā€˜select2dā€™ ] )
TypeError: init() got an unexpected keyword argument ā€˜modeBarButtonsToRemoveā€™

regards

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