@@ -101,9 +101,6 @@ def __init__(self, data, kind=None, by=None, subplots=False, sharex=True,
101
101
102
102
self .kwds = kwds
103
103
104
- # if self.xticks is None:
105
- # self.xticks = self._get_xticks()
106
-
107
104
def _iter_data (self ):
108
105
from pandas .core .frame import DataFrame
109
106
from pandas .core .series import Series
@@ -411,8 +408,8 @@ def plot_frame(frame=None, subplots=False, sharex=True, sharey=False,
411
408
kind = 'line' ,
412
409
sort_columns = True , fontsize = None , ** kwds ):
413
410
"""
414
- Make line plot of DataFrame's series with the index on the x-axis using
415
- matplotlib / pylab.
411
+ Make line or bar plot of DataFrame's series with the index on the x-axis
412
+ using matplotlib / pylab.
416
413
417
414
Parameters
418
415
----------
@@ -424,16 +421,37 @@ def plot_frame(frame=None, subplots=False, sharex=True, sharey=False,
424
421
In case subplots=True, share y axis
425
422
use_index : boolean, default True
426
423
Use index as ticks for x axis
427
- kind : {'line', 'bar'}
424
+ stacked : boolean, default False
425
+ If True, create stacked bar plot. Only valid for DataFrame input
428
426
sort_columns: boolean, default True
429
427
Sort column names to determine plot ordering
428
+ title : string
429
+ Title to use for the plot
430
+ grid : boolean, default True
431
+ Axis grid lines
432
+ legend : boolean, default True
433
+ Place legend on axis subplots
434
+
435
+ ax : matplotlib axis object, default None
436
+ kind : {'line', 'bar', 'barh'}
437
+ bar : vertical bar plot
438
+ barh : horizontal bar plot
439
+ logy : boolean, default False
440
+ For line plots, use log scaling on y axis
441
+ xticks : sequence
442
+ Values to use for the xticks
443
+ yticks : sequence
444
+ Values to use for the yticks
445
+ xlim : 2-tuple/list
446
+ ylim : 2-tuple/list
447
+ rot : int, default None
448
+ Rotation for ticks
430
449
kwds : keywords
431
- Options to pass to Axis.plot
450
+ Options to pass to matplotlib plotting method
432
451
433
- Notes
434
- -----
435
- This method doesn't make much sense for cross-sections,
436
- and will error.
452
+ Returns
453
+ -------
454
+ ax_or_axes : matplotlib.AxesSubplot or list of them
437
455
"""
438
456
if kind == 'line' :
439
457
klass = LinePlot
@@ -472,13 +490,28 @@ def plot_series(series, label=None, kind='line', use_index=True, rot=None,
472
490
If not passed, uses gca()
473
491
style : string, default matplotlib default
474
492
matplotlib line style to use
493
+
494
+ ax : matplotlib axis object
495
+ If not passed, uses gca()
496
+ kind : {'line', 'bar', 'barh'}
497
+ bar : vertical bar plot
498
+ barh : horizontal bar plot
499
+ logy : boolean, default False
500
+ For line plots, use log scaling on y axis
501
+ xticks : sequence
502
+ Values to use for the xticks
503
+ yticks : sequence
504
+ Values to use for the yticks
505
+ xlim : 2-tuple/list
506
+ ylim : 2-tuple/list
507
+ rot : int, default None
508
+ Rotation for ticks
475
509
kwds : keywords
476
- To be passed to the actual plotting function
510
+ Options to pass to matplotlib plotting method
477
511
478
512
Notes
479
513
-----
480
514
See matplotlib documentation online for more on this subject
481
- Intended to be used in ipython --pylab mode
482
515
"""
483
516
if kind == 'line' :
484
517
klass = LinePlot
@@ -560,12 +593,14 @@ def plot_group(grouped, ax):
560
593
fig .subplots_adjust (bottom = 0.15 , top = 0.9 , left = 0.1 , right = 0.9 , wspace = 0.2 )
561
594
return ax
562
595
596
+
563
597
def _stringify (x ):
564
598
if isinstance (x , tuple ):
565
599
return '|' .join (str (y ) for y in x )
566
600
else :
567
601
return str (x )
568
602
603
+
569
604
def format_date_labels (ax ):
570
605
# mini version of autofmt_xdate
571
606
try :
0 commit comments