pandas.plotting.parallel_coordinates

pandas.plotting.parallel_coordinates(frame, class_column, cols=None, ax=None, color=None, use_columns=False, xticks=None, colormap=None, axvlines=True, axvlines_kwds=None, sort_labels=False, **kwds)[source]

Parallel coordinates plotting.

Parameters:
frame: DataFrame

class_column: str

Column name containing class names

cols: list, optional

A list of column names to use

ax: matplotlib.axis, optional

matplotlib axis object

color: list or tuple, optional

Colors to use for the different classes

use_columns: bool, optional

If true, columns will be used as xticks

xticks: list or tuple, optional

A list of values to use for xticks

colormap: str or matplotlib colormap, default None

Colormap to use for line colors.

axvlines: bool, optional

If true, vertical lines will be added at each xtick

axvlines_kwds: keywords, optional

Options to be passed to axvline method for vertical lines

sort_labels: bool, False

Sort class_column labels, useful when assigning colors

New in version 0.20.0.

kwds: keywords

Options to pass to matplotlib plotting method

Returns:
ax: matplotlib axis object

Examples

>>> from pandas import read_csv
>>> from pandas.tools.plotting import parallel_coordinates
>>> from matplotlib import pyplot as plt
>>> df = read_csv('https://raw.github.com/pandas-dev/pandas/master'
                  '/pandas/tests/data/iris.csv')
>>> parallel_coordinates(df, 'Name', color=('#556270',
                         '#4ECDC4', '#C7F464'))
>>> plt.show()
Scroll To Top