# Plotly Chart-Studio config parameter to change Modebar in Python

**URL:** https://community.plotly.com/t/plotly-chart-studio-config-parameter-to-change-modebar-in-python/41509
**Category:** 📊 Plotly Python
**Created:** [June 24, 2020, 12:03pm UTC](https://community.plotly.com/t/plotly-chart-studio-config-parameter-to-change-modebar-in-python/41509 "2020-06-24T12:03:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![zakzola](https://avatars.discourse-cdn.com/v4/letter/z/13edae/32.png) [@zakzola](https://community.plotly.com/u/zakzola)
#### Post date: [June 24, 2020, 12:03pm UTC](https://community.plotly.com/t/plotly-chart-studio-config-parameter-to-change-modebar-in-python/41509/1 "2020-06-24T12:03:13Z")

</div>

I’ve created a simple Plotly chart in Python, and I can change the Modebar options quite easily. However, when I’m trying to publish the same chart to Chart-Studio, not all the Modebar configurations are working. Any ideas?

Here is the code:

```auto
import pandas as pd
import numpy as np
import plotly.graph_objects as go

df = pd.DataFrame({'a':[2,4,6,8,10],'b':[3,6,9,12,15]})

fig = go.Figure()
    
fig.add_trace(go.Scatter(x=df.index, y=df['a'], mode='lines', name='a', line=dict(color='dodgerblue', dash='solid')))
fig.add_trace(go.Scatter(x=df.index, y=df['b'], mode='lines', name='b', line=dict(color='lightsalmon', dash='dash')))

fig.update_layout(
    title='a and b',
    autosize=False,
    width=500,
    height=500,
    newshape=dict(line_color='mediumaquamarine', line_width=2, opacity=1)
)

config = {
    'modeBarButtonsToAdd' : ['drawline', 'drawopenpath', 'drawrect', 'eraseshape'],
    'displaylogo' : False
}

fig.show(config=config)

```

The figure that appears has the logo removed and the additional buttons on the modebar showing as it should…

However, if I try to publish this to Chart-Studio:

```auto
import chart_studio.plotly as py
import chart_studio

chart_studio.tools.set_credentials_file(username='xxxxx', api_key='#####')

py.plot(fig, filename='a and b', auto_open=False, config=config)

```

This doesn’t work. Note, the logo doesn’t appear so I thought that part was working, but actually if I turn `displaylogo=True` then it doesn’t show the logo either. So it appears none of the config arguments are working.

I’m not sure if this is exactly the way to update `config` in Chart-Studio but I can’t find any documentation for it, I tried this based on this old post:

[Adding config modes to Plotly.Py offline - modebar](https://stackoverflow.com/questions/36554705/adding-config-modes-to-plotly-py-offline-modebar)

I also tried saving the fig file with the config argument and publishing that but that gives an error. What I’ve tried here doesn’t give an error but it doesn’t do anything.

Thanks

---

<div class="post-metadata">

### Author: ![chenfafa](https://avatars.discourse-cdn.com/v4/letter/c/b5a626/32.png) [@chenfafa](https://community.plotly.com/u/chenfafa)
#### Post date: [September 18, 2020, 4:53pm UTC](https://community.plotly.com/t/plotly-chart-studio-config-parameter-to-change-modebar-in-python/41509/2 "2020-09-18T16:53:39Z")

</div>

I encountered the same problem. The modebar changed locally only.

---

<div class="post-metadata">

### Author: ![bigmike](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@bigmike](https://community.plotly.com/u/bigmike)
#### Post date: [May 3, 2021, 3:30pm UTC](https://community.plotly.com/t/plotly-chart-studio-config-parameter-to-change-modebar-in-python/41509/3 "2021-05-03T15:30:53Z")

</div>

I’m encountering the same issue. Did either of you ever find a solution, @zakzola, @chenfafa?

---

<div class="post-metadata">

### Author: ![FarizMR](https://avatars.discourse-cdn.com/v4/letter/f/8baadc/32.png) [@FarizMR](https://community.plotly.com/u/FarizMR)
#### Post date: [March 6, 2023, 6:55am UTC](https://community.plotly.com/t/plotly-chart-studio-config-parameter-to-change-modebar-in-python/41509/4 "2023-03-06T06:55:50Z")

</div>

Hy! I know this is an old thread. But as far as I can manage it by change the color in JSON tab. Work fine to me.  
Json tab \> Tree \> Figure \> layout \> modebar then change it to rgba and set the alpha to 0.

```auto
modebar {4}
orientation	:	h
bgcolor	: rgba(255, 255, 255, 0)
color	: rgba(68, 68, 68, 0)
activecolor	: rgba(68, 68, 68, 0)

```
