Skip to content

Commit 4c65e2d

Browse files
author
Josiah Baker
committed
fix plotting docstrings errors pr09,pr08
this is related to pandas-dev#28702 also fix a few formatting issues related to default arguments and argument ordering
1 parent 88a6ee1 commit 4c65e2d

File tree

1 file changed

+30
-40
lines changed

1 file changed

+30
-40
lines changed

pandas/plotting/_core.py

+30-40
Original file line numberDiff line numberDiff line change
@@ -507,86 +507,76 @@ class PlotAccessor(PandasObject):
507507
Parameters
508508
----------
509509
data : Series or DataFrame
510-
The object for which the method is called
510+
The object for which the method is called.
511511
x : label or position, default None
512512
Only used if data is a DataFrame.
513513
y : label, position or list of label, positions, default None
514514
Allows plotting of one column versus another. Only used if data is a
515515
DataFrame.
516-
kind : str
517-
The kind of plot to produce:
518-
519-
- 'line' : line plot (default)
520-
- 'bar' : vertical bar plot
521-
- 'barh' : horizontal bar plot
522-
- 'hist' : histogram
523-
- 'box' : boxplot
524-
- 'kde' : Kernel Density Estimation plot
525-
- 'density' : same as 'kde'
526-
- 'area' : area plot
527-
- 'pie' : pie plot
528-
- 'scatter' : scatter plot
529-
- 'hexbin' : hexbin plot
516+
kind : {'line', 'bar', 'barh', 'hist', 'box', 'kde', 'density', 'area', \
517+
'pie','scatter','hexbin'}, default 'line'
518+
The kind of plot to produce.
530519
figsize : a tuple (width, height) in inches
531520
use_index : bool, default True
532-
Use index as ticks for x axis
521+
Use index as ticks for x axis.
533522
title : str or list
534523
Title to use for the plot. If a string is passed, print the string
535524
at the top of the figure. If a list is passed and `subplots` is
536525
True, print each item in the list above the corresponding subplot.
537526
grid : bool, default None (matlab style default)
538-
Axis grid lines
539-
legend : False/True/'reverse'
540-
Place legend on axis subplots
527+
Axis grid lines.
528+
legend : bool or 'reverse'
529+
Place legend on axis subplots.
541530
style : list or dict
542-
The matplotlib line style per column
531+
The matplotlib line style per column.
543532
logx : bool or 'sym', default False
544-
Use log scaling or symlog scaling on x axis
533+
Use log scaling or symlog scaling on x axis.
534+
545535
.. versionchanged:: 0.25.0
546536
547-
logy : bool or 'sym' default False
548-
Use log scaling or symlog scaling on y axis
537+
logy : bool or 'sym', default False
538+
Use log scaling or symlog scaling on y axis.
539+
549540
.. versionchanged:: 0.25.0
550541
551542
loglog : bool or 'sym', default False
552-
Use log scaling or symlog scaling on both x and y axes
543+
Use log scaling or symlog scaling on both x and y axes.
544+
553545
.. versionchanged:: 0.25.0
554546
555547
xticks : sequence
556548
Values to use for the xticks.
557549
yticks : sequence
558550
Values to use for the yticks.
559-
xlim : 2-tuple/list
560-
ylim : 2-tuple/list
561-
rot : int, default None
551+
xlim : tuple of (int, int) or list of int
552+
ylim : tuple of (int, int) or list of int
553+
rot : int, optional
562554
Rotation for ticks (xticks for vertical, yticks for horizontal
563-
plots)
564-
fontsize : int, default None
555+
plots).
556+
fontsize : int, optional
565557
Font size for xticks and yticks.
566-
colormap : str or matplotlib colormap object, default None
558+
colormap : str or matplotlib colormap object, optional
567559
Colormap to select colors from. If string, load colormap with that
568560
name from matplotlib.
569561
colorbar : bool, optional
570562
If True, plot colorbar (only relevant for 'scatter' and 'hexbin'
571-
plots)
572-
position : float
563+
plots).
564+
position : float, default 0.5, meaning center
573565
Specify relative alignments for bar plot layout.
574-
From 0 (left/bottom-end) to 1 (right/top-end). Default is 0.5
575-
(center)
566+
From 0 (left/bottom-end) to 1 (right/top-end).
576567
table : bool, Series or DataFrame, default False
577568
If True, draw a table using the data in the DataFrame and the data
578569
will be transposed to meet matplotlib's default layout.
579-
If a Series or DataFrame is passed, use passed data to draw a
580-
table.
581-
yerr : DataFrame, Series, array-like, dict and str
570+
If a Series or DataFrame is passed, use passed data to draw a table.
571+
yerr : DataFrame, Series, array-like, dict or str
582572
See :ref:`Plotting with Error Bars <visualization.errorbars>` for
583573
detail.
584-
xerr : DataFrame, Series, array-like, dict and str
574+
xerr : DataFrame, Series, array-like, dict or str
585575
Equivalent to yerr.
586576
mark_right : bool, default True
587577
When using a secondary_y axis, automatically mark the column
588-
labels with "(right)" in the legend
589-
include_bool : bool, default is False
578+
labels with "(right)" in the legend.
579+
include_bool : bool, default False
590580
If True, boolean values can be plotted.
591581
**kwargs
592582
Options to pass to matplotlib plotting method.

0 commit comments

Comments
 (0)