Skip to content

Commit 686b5b4

Browse files
committed
Expanded on parallel_plot() docstring
1 parent 6a6684f commit 686b5b4

File tree

1 file changed

+29
-12
lines changed

1 file changed

+29
-12
lines changed

pandas/tools/plotting.py

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -415,20 +415,37 @@ def parallel_coordinates(data, class_column, cols=None, ax=None, colors=None,
415415
use_columns=False, xticks=None, **kwds):
416416
"""Parallel coordinates plotting.
417417
418-
Parameters:
419-
-----------
420-
data: A DataFrame containing data to be plotted
421-
class_column: Column name containing class names
422-
cols: A list of column names to use, optional
423-
ax: matplotlib axis object, optional
424-
colors: A list or tuple of colors to use for the different classes, optional
425-
use_columns: If true, columns will be used as xticks, optional
426-
xticks: A list of values to use for xticks, optional
427-
kwds: A list of keywords for matplotlib plot method
418+
Parameters
419+
----------
420+
data: DataFrame
421+
A DataFrame containing data to be plotted
422+
class_column: str
423+
Column name containing class names
424+
cols: list, optional
425+
A list of column names to use
426+
ax: matplotlib.axis, optional
427+
matplotlib axis object
428+
colors: list or tuple, optional
429+
Colors to use for the different classes
430+
use_columns: bool, optional
431+
If true, columns will be used as xticks
432+
xticks: list or tuple, optional
433+
A list of values to use for xticks
434+
kwds: list, optional
435+
A list of keywords for matplotlib plot method
428436
429-
Returns:
430-
--------
437+
Returns
438+
-------
431439
ax: matplotlib axis object
440+
441+
Examples
442+
--------
443+
>>> from pandas import read_csv
444+
>>> from pandas.tools.plotting import parallel_coordinates
445+
>>> from matplotlib import pyplot as plt
446+
>>> df = read_csv('https://raw.github.com/pydata/pandas/master/pandas/tests/data/iris.csv')
447+
>>> parallel_coordinates(df, 'Name', colors=('#556270', '#4ECDC4', '#C7F464'))
448+
>>> plt.show()
432449
"""
433450
import matplotlib.pyplot as plt
434451
import random

0 commit comments

Comments
 (0)