@@ -2281,7 +2281,8 @@ def _plot(data, x=None, y=None, subplots=False,
2281
2281
2282
2282
for kw in ['xerr' , 'yerr' ]:
2283
2283
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 ])):
2285
2286
try :
2286
2287
kwds [kw ] = data [kwds [kw ]]
2287
2288
except (IndexError , KeyError , TypeError ):
@@ -2303,8 +2304,8 @@ def _plot(data, x=None, y=None, subplots=False,
2303
2304
Allows plotting of one column versus another"""
2304
2305
series_coord = ""
2305
2306
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.
2308
2309
sort_columns : boolean, default False
2309
2310
Sort column names to determine plot ordering
2310
2311
secondary_y : boolean or sequence, default False
@@ -2344,7 +2345,8 @@ def _plot(data, x=None, y=None, subplots=False,
2344
2345
klass_unique = df_unique , klass_note = df_note )
2345
2346
_shared_doc_series_kwargs = dict (klass = 'Series' , klass_kind = series_kind ,
2346
2347
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 )
2348
2350
2349
2351
_shared_docs ['plot' ] = """
2350
2352
Make plots of %(klass)s using matplotlib / pylab.
@@ -2440,33 +2442,33 @@ def _plot(data, x=None, y=None, subplots=False,
2440
2442
@Appender (_shared_docs ['plot' ] % _shared_doc_df_kwargs )
2441
2443
def plot_frame (data , x = None , y = None , kind = 'line' , ax = None , # Dataframe unique
2442
2444
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 ,
2445
2447
xticks = None , yticks = None , xlim = None , ylim = None ,
2446
2448
rot = None , fontsize = None , colormap = None , table = False ,
2447
2449
yerr = None , xerr = None ,
2448
2450
secondary_y = False , sort_columns = False , # Dataframe unique
2449
2451
** kwds ):
2450
2452
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 )
2460
2462
2461
2463
2462
2464
@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 ,
2466
2468
xticks = None , yticks = None , xlim = None , ylim = None ,
2467
2469
rot = None , fontsize = None , colormap = None , table = False ,
2468
2470
yerr = None , xerr = None ,
2469
- label = None , secondary_y = False , # Series unique
2471
+ label = None , secondary_y = False , # Series unique
2470
2472
** kwds ):
2471
2473
2472
2474
import matplotlib .pyplot as plt
@@ -2543,7 +2545,6 @@ def boxplot(data, column=None, by=None, ax=None, fontsize=None,
2543
2545
** kwds ):
2544
2546
2545
2547
# validate return_type:
2546
- valid_types = (None , 'axes' , 'dict' , 'both' )
2547
2548
if return_type not in BoxPlot ._valid_return_types :
2548
2549
raise ValueError ("return_type must be {None, 'axes', 'dict', 'both'}" )
2549
2550
@@ -2556,11 +2557,11 @@ def _get_colors():
2556
2557
return _get_standard_colors (color = kwds .get ('color' ), num_colors = 1 )
2557
2558
2558
2559
def maybe_color_bp (bp ):
2559
- if 'color' not in kwds :
2560
+ if 'color' not in kwds :
2560
2561
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 )
2564
2565
2565
2566
def plot_group (keys , values , ax ):
2566
2567
keys = [com .pprint_thing (x ) for x in keys ]
@@ -2592,7 +2593,8 @@ def plot_group(keys, values, ax):
2592
2593
if by is not None :
2593
2594
result = _grouped_plot_by_column (plot_group , data , columns = columns ,
2594
2595
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 )
2596
2598
else :
2597
2599
if layout is not None :
2598
2600
raise ValueError ("The 'layout' keyword is not supported when "
@@ -2632,7 +2634,8 @@ def format_date_labels(ax, rot):
2632
2634
pass
2633
2635
2634
2636
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 ):
2636
2639
"""
2637
2640
Make a scatter plot from two DataFrame columns
2638
2641
0 commit comments