Show Sidebar Hide Sidebar

Configuration in Python

How to set configuration options of plotly graphs in python. Examples of both online and offline configurations.

New to Plotly?¶

Plotly's Python library is free and open source! Get started by downloading the client and reading the primer.
You can set up Plotly to work in online or offline mode, or in jupyter notebooks.
We also have a quick-reference cheatsheet (new!) to help you get started!

Online Configuration Options¶

Config options set via our Open Source Graphing Libraries are overridden on graphs hosted on (i.e. when working online). To set configutation options online, you can edit the plot's embed url. Visit our embed tutorial: for more information on customizing the embed url to remove the "Edit Chart" link, hide the modebar, or autosize the plot.

Offline Configuration Options¶

Now you can pass a config dictionary with all configurations options such as showLink, linkText, scrollZoom, and displayModeBar. For the complete list of config options check out:

Remove the "Edit Chart" link:

In [10]:
from plotly.offline import init_notebook_mode, iplot
import plotly.graph_objs as go


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

config={'showLink': False}
iplot(data, config=config)