# Bumps documentation

## parcoord - Parallel coordinates plot

`best_in_bin` | Find the index of the minimum value in each bin for the data in x.
`parallel_coordinates` | Produce a parallel coordinates plot.
`plot` | Plot parallel coordinates from a draw from the distribution.
`scale` | Returns x with values scaled to [0, 1].

bumps.dream.parcoord.best_in_bin(x, value, bins=50, range=None, keep_empty=False)

  Find the index of the minimum value in each bin for the data in x.

  x are the coordinates to be binned.

  value are the objective to be minimized in each bin, such as chisq. There is one value for each x coordinate.

  bins are the number of bins within range or an array of bin edges if the bins are not uniform.

  range is the data range for the bins. The default is (x.min(), x.max()).

  keep_empty is True if empty bins will return an index of -1. When False (the default), empty bins are removed.

  Returns indices of the elements which are the minimum within each bin. This list may be shorter than the number of bins if keep_empty is False.

  The algorithm works by assigning a bin number to each point then adding an offset in [0, 1) according to the scaled value. These point values are then sorted, and searched by bin number. The returned index will correspond to the first value in each bin, and therefore, the best value in that bin. From this the index into the original list can be returned.

bumps.dream.parcoord.parallel_coordinates(data, labels=None, value=None, value_label='')

  Produce a parallel coordinates plot.

  data is a set of points to draw, one row per point.

  labels is the label to assign to the dimensions, one per column in data.

  value is an optional value to use to color the different lines. This could be the value of the control variable, or some additional dimension such as overall quality for the individual points.

  value_label is the label to put on the colorbar for the line colors.

bumps.dream.parcoord.plot(draw, nlines=150, control_var=None)

  Plot parallel coordinates from a draw from the distribution.

  draw is the draw from the sample

  nlines is the number of lines to draw

  If control_var is provided, then the best value from each bin in the histogram for that variable will be chosen as a line to draw on the coordination plot. This will will produce a roughly equally spaced set of coordination points for that variable. If control_var is None, then lines will be picked at random.

bumps.dream.parcoord.scale(x, axis=None)

  Returns x with values scaled to [0, 1].

  If axis is not None, then scale values within each axis independently, otherwise use the min/max value across all dimensions.