By default a plotly plot has their logo with text like "Produced with plotly" (top right). I have a premium account and would like to remove that logo.
Here is a little code snippet that does the final plot:
plotly.tools.set_credentials_file(username='username', api_key='xxxxxxx')
list_df = pd.read_csv('my_csv_file.csv')
names_df = list_df['Name']
trace = go.Scatter(
x = list_df['Abc'],
y = list_df['Xyz'],
visible=True,
text=names_df,
hoverinfo = 'text',
hoverlabel=dict(bgcolor='white'),
name='ABC',
line = dict(color='#17BECF'),
mode = "markers",
marker=dict(size=8),
showlegend=False,
opacity = 0.8
)
data = [trace]
layout = go.Layout(
title='Lyout Name',
hovermode = 'closest',
xaxis=dict(
title='Title X axis',
titlefont=dict(
family='Courier New, monospace',
size=18,
color='#7f7f7f'
)
),
yaxis=dict(
title='Title Y axis',
titlefont=dict(
family='Courier New, monospace',
size=18,
color='#7f7f7f'
)
)
)
config = {
'scrollZoom': False,
'displayModeBar': True,
'editable': True,
'showLink':False,
'displaylogo': False
}
fig = dict(data=data, layout=layout)
py.plot(fig, filename='Filename', auto_open=False, config=config, sharing='secret')
With "'displaylogo': False" in config I expected the logo being removed. But it doesn't.
Your mentioned config should be put in fig.show() method or in dcc.graph(), same as follow:
fig.show(id='the_graph', config= {'displaylogo': False})
or
dcc.Graph(id='the_graph', config= {'displaylogo': False})
This is what I got from the official page
Hide the Plotly Logo on the Modebar
var trace1 = {
x:['trees', 'flowers', 'hedges'],
y: [90, 130, 40],
type: 'bar'
};
var data = [trace1];
var layout = {
title: 'Hide the Plotly Logo on the Modebar',
showlegend: false
};
Plotly.newPlot('myDiv', data, layout, {displaylogo: false});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With