Skip to content

Commit 678409f

Browse files
author
TomAugspurger
committed
PEP8 fixups
1 parent 53cc1b7 commit 678409f

File tree

1 file changed

+29
-26
lines changed

1 file changed

+29
-26
lines changed

pandas/tools/plotting.py

+29-26
Original file line numberDiff line numberDiff line change
@@ -2281,7 +2281,8 @@ def _plot(data, x=None, y=None, subplots=False,
22812281

22822282
for kw in ['xerr', 'yerr']:
22832283
if (kw in kwds) and \
2284-
(isinstance(kwds[kw], string_types) or com.is_integer(kwds[kw])):
2284+
(isinstance(kwds[kw], string_types) or
2285+
com.is_integer(kwds[kw])):
22852286
try:
22862287
kwds[kw] = data[kwds[kw]]
22872288
except (IndexError, KeyError, TypeError):
@@ -2303,8 +2304,8 @@ def _plot(data, x=None, y=None, subplots=False,
23032304
Allows plotting of one column versus another"""
23042305
series_coord = ""
23052306

2306-
df_unique = """stacked : boolean, default False in line and bar plots, and True in area plot.
2307-
If True, create stacked plot.
2307+
df_unique = """stacked : boolean, default False in line and
2308+
bar plots, and True in area plot. If True, create stacked plot.
23082309
sort_columns : boolean, default False
23092310
Sort column names to determine plot ordering
23102311
secondary_y : boolean or sequence, default False
@@ -2344,7 +2345,8 @@ def _plot(data, x=None, y=None, subplots=False,
23442345
klass_unique=df_unique, klass_note=df_note)
23452346
_shared_doc_series_kwargs = dict(klass='Series', klass_kind=series_kind,
23462347
klass_coord=series_coord, klass_ax=series_ax,
2347-
klass_unique=series_unique, klass_note=series_note)
2348+
klass_unique=series_unique,
2349+
klass_note=series_note)
23482350

23492351
_shared_docs['plot'] = """
23502352
Make plots of %(klass)s using matplotlib / pylab.
@@ -2440,33 +2442,33 @@ def _plot(data, x=None, y=None, subplots=False,
24402442
@Appender(_shared_docs['plot'] % _shared_doc_df_kwargs)
24412443
def plot_frame(data, x=None, y=None, kind='line', ax=None, # Dataframe unique
24422444
subplots=False, sharex=True, sharey=False, layout=None, # Dataframe unique
2443-
figsize=None, use_index=True, title=None, grid=None, legend=True,
2444-
style=None, logx=False, logy=False, loglog=False,
2445+
figsize=None, use_index=True, title=None, grid=None,
2446+
legend=True, style=None, logx=False, logy=False, loglog=False,
24452447
xticks=None, yticks=None, xlim=None, ylim=None,
24462448
rot=None, fontsize=None, colormap=None, table=False,
24472449
yerr=None, xerr=None,
24482450
secondary_y=False, sort_columns=False, # Dataframe unique
24492451
**kwds):
24502452
return _plot(data, kind=kind, x=x, y=y, ax=ax,
2451-
subplots=subplots, sharex=sharex, sharey=sharey, layout=layout,
2452-
figsize=figsize, use_index=use_index, title=title,
2453-
grid=grid, legend=legend,
2454-
style=style, logx=logx, logy=logy, loglog=loglog,
2455-
xticks=xticks, yticks=yticks, xlim=xlim, ylim=ylim,
2456-
rot=rot, fontsize=fontsize, colormap=colormap, table=table,
2457-
yerr=yerr, xerr=xerr,
2458-
secondary_y=secondary_y, sort_columns=sort_columns,
2459-
**kwds)
2453+
subplots=subplots, sharex=sharex, sharey=sharey,
2454+
layout=layout, figsize=figsize, use_index=use_index,
2455+
title=title, grid=grid, legend=legend,
2456+
style=style, logx=logx, logy=logy, loglog=loglog,
2457+
xticks=xticks, yticks=yticks, xlim=xlim, ylim=ylim,
2458+
rot=rot, fontsize=fontsize, colormap=colormap, table=table,
2459+
yerr=yerr, xerr=xerr,
2460+
secondary_y=secondary_y, sort_columns=sort_columns,
2461+
**kwds)
24602462

24612463

24622464
@Appender(_shared_docs['plot'] % _shared_doc_series_kwargs)
2463-
def plot_series(data, kind='line', ax=None, # Series unique
2464-
figsize=None, use_index=True, title=None, grid=None, legend=True,
2465-
style=None, logx=False, logy=False, loglog=False,
2465+
def plot_series(data, kind='line', ax=None, # Series unique
2466+
figsize=None, use_index=True, title=None, grid=None,
2467+
legend=True, style=None, logx=False, logy=False, loglog=False,
24662468
xticks=None, yticks=None, xlim=None, ylim=None,
24672469
rot=None, fontsize=None, colormap=None, table=False,
24682470
yerr=None, xerr=None,
2469-
label=None, secondary_y=False, # Series unique
2471+
label=None, secondary_y=False, # Series unique
24702472
**kwds):
24712473

24722474
import matplotlib.pyplot as plt
@@ -2543,7 +2545,6 @@ def boxplot(data, column=None, by=None, ax=None, fontsize=None,
25432545
**kwds):
25442546

25452547
# validate return_type:
2546-
valid_types = (None, 'axes', 'dict', 'both')
25472548
if return_type not in BoxPlot._valid_return_types:
25482549
raise ValueError("return_type must be {None, 'axes', 'dict', 'both'}")
25492550

@@ -2556,11 +2557,11 @@ def _get_colors():
25562557
return _get_standard_colors(color=kwds.get('color'), num_colors=1)
25572558

25582559
def maybe_color_bp(bp):
2559-
if 'color' not in kwds :
2560+
if 'color' not in kwds:
25602561
from matplotlib.artist import setp
2561-
setp(bp['boxes'],color=colors[0],alpha=1)
2562-
setp(bp['whiskers'],color=colors[0],alpha=1)
2563-
setp(bp['medians'],color=colors[2],alpha=1)
2562+
setp(bp['boxes'], color=colors[0], alpha=1)
2563+
setp(bp['whiskers'], color=colors[0], alpha=1)
2564+
setp(bp['medians'], color=colors[2], alpha=1)
25642565

25652566
def plot_group(keys, values, ax):
25662567
keys = [com.pprint_thing(x) for x in keys]
@@ -2592,7 +2593,8 @@ def plot_group(keys, values, ax):
25922593
if by is not None:
25932594
result = _grouped_plot_by_column(plot_group, data, columns=columns,
25942595
by=by, grid=grid, figsize=figsize,
2595-
ax=ax, layout=layout, return_type=return_type)
2596+
ax=ax, layout=layout,
2597+
return_type=return_type)
25962598
else:
25972599
if layout is not None:
25982600
raise ValueError("The 'layout' keyword is not supported when "
@@ -2632,7 +2634,8 @@ def format_date_labels(ax, rot):
26322634
pass
26332635

26342636

2635-
def scatter_plot(data, x, y, by=None, ax=None, figsize=None, grid=False, **kwargs):
2637+
def scatter_plot(data, x, y, by=None, ax=None, figsize=None, grid=False,
2638+
**kwargs):
26362639
"""
26372640
Make a scatter plot from two DataFrame columns
26382641

0 commit comments

Comments
 (0)