Skip to content

Commit 687e233

Browse files
author
yankev
committed
pep8 changes
1 parent 108109a commit 687e233

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

plotly/offline/offline.py

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
import os
1010
import uuid
1111
import warnings
12-
from pkg_resources import resource_string
1312
import webbrowser
1413

14+
from pkg_resources import resource_string
15+
16+
1517
import plotly
1618
from plotly import tools, utils
1719
from plotly.exceptions import PlotlyError
@@ -98,25 +100,25 @@ def _plot_html(figure_or_data, config,
98100
jlayout = json.dumps(figure.get('layout', {}), cls=utils.PlotlyJSONEncoder)
99101

100102
configkeys = (
101-
'editable',
102-
'autosizable',
103-
'fillFrame',
104-
'frameMargins',
105-
'scrollZoom',
106-
'doubleClick',
107-
'showTips',
108-
'showLink',
109-
'sendData',
110-
'linkText',
111-
'showSources',
112-
'displayModeBar',
113-
'modeBarButtonsToRemove',
114-
'modeBarButtonsToAdd',
115-
'modeBarButtons',
116-
'displaylogo',
117-
'plotGlPixelRatio',
118-
'setBackground',
119-
'topojsonURL')
103+
'editable',
104+
'autosizable',
105+
'fillFrame',
106+
'frameMargins',
107+
'scrollZoom',
108+
'doubleClick',
109+
'showTips',
110+
'showLink',
111+
'sendData',
112+
'linkText',
113+
'showSources',
114+
'displayModeBar',
115+
'modeBarButtonsToRemove',
116+
'modeBarButtonsToAdd',
117+
'modeBarButtons',
118+
'displaylogo',
119+
'plotGlPixelRatio',
120+
'setBackground',
121+
'topojsonURL')
120122

121123
config_clean = dict((k,config[k]) for k in configkeys if k in config)
122124

@@ -159,7 +161,7 @@ def _plot_html(figure_or_data, config,
159161
return plotly_html_div, plotdivid, width, height
160162

161163

162-
def iplot(figure_or_data, config = {'showLink': True, 'linkText': 'Export to plot.ly'},
164+
def iplot(figure_or_data, config={'showLink': True, 'linkText': 'Export to plot.ly'},
163165
validate=True):
164166
"""
165167
Draw plotly graphs inside an IPython notebook without
@@ -406,8 +408,8 @@ def plot_mpl(mpl_fig, resize=False, strip_style=False,
406408
include_plotlyjs, filename, auto_open)
407409

408410

409-
def iplot_mpl(mpl_fig, resize=False, strip_style=False,
410-
verbose=False, config = {'showLink':True, 'linkText':'Export to plot.ly'},
411+
def iplot_mpl(mpl_fig, resize=False, strip_style=False, verbose=False,
412+
config={'showLink': True, 'linkText': 'Export to plot.ly'},
411413
validate=True):
412414
"""
413415
Convert a matplotlib figure to a plotly graph and plot inside an IPython
@@ -494,5 +496,4 @@ def enable_mpl_offline(resize=False, strip_style=False,
494496
formatter = ip.display_formatter.formatters['text/html']
495497
formatter.for_type(matplotlib.figure.Figure,
496498
lambda fig: iplot_mpl(fig, resize, strip_style, verbose,
497-
config, validate))
498-
499+
config, validate))

0 commit comments

Comments
 (0)