parcoords

This module offers a general purpose parallel coordinate plotting Class using matplotlib.

class ema_workbench.analysis.parcoords.ParallelAxes(limits, formatter=None, fontsize=14, rot=90)

Base class for creating a parallel axis plot.

Parameters:
  • limits (DataFrame) – A DataFrame specifying the limits for each dimension in the data set. For categorical data, the first cell should contain all categories. See get_limits for more details.

  • formattter (dict , optional) – dict with precision format strings for minima and maxima, use column name as key. If column is not present, or no formatter dict is provided, precision formatting defaults to .2f

  • fontsize (int, optional) – fontsize for defaults text items

  • rot (float, optional) – rotation of axis labels

limits

A DataFrame specifying the limits for each dimension in the data set. For categorical data, the first cell should contain all categories.

Type:

DataFrame

recoding

non numeric columns are converting to integer variables

Type:

dict

flipped_axes

set of Axes that are to be shown flipped

Type:

set

axis_labels
Type:

list of str

fontsize
Type:

int

fig
Type:

a matplotlib Figure instance

axes
Type:

list of matplotlib Axes instances

ticklabels
Type:

list of str

datalabels

labels associated with lines

Type:

list of str

Notes

The basic setup of the Parallel Axis plot is a row of mpl Axes instances, with all whitespace in between removed. The number of Axes is the number of columns - 1.

invert_axis(axis)

flip direction for specified axis

Parameters:

axis (str or list of str)

legend()

add a legend to the figure

plot(data, color=None, label=None, **kwargs)

plot data on parallel axes

Parameters:
  • data (DataFrame or Series)

  • color (valid mpl color, optional)

  • label (str, optional)

  • plot (any additional kwargs will be passed to matplotlib's)

  • method.

  • initializing (Data is normalized using the limits specified when)

  • ParallelAxis.

ema_workbench.analysis.parcoords.get_limits(data)

helper function to get limits of a FataFrame that can serve as input to ParallelAxis

Parameters:

data (DataFrame)

Return type:

DataFrame