11.1.2.1. astroML.plotting.MultiAxes

class astroML.plotting.MultiAxes(ndim, inner_labels=False, fig=None, left=None, bottom=None, right=None, top=None, wspace=None, hspace=None)[source]

Visualize Multiple-dimensional data

This class enables the visualization of multi-dimensional data, using a triangular grid of 2D plots.

Parameters
ndiminteger

Number of data dimensions

inner_labelsbool

If true, then label the inner axes. If false, then only the outer axes will be labeled

figmatplotlib.Figure

if specified, draw the plot on this figure. Otherwise, use the current active figure.

left, bottom, right, top, wspace, hspacefloats

these parameters control the layout of the plots. They behave have an identical effect as the arguments to plt.subplots_adjust. If not specified, default values from the rc file will be used.

Examples

A grid of scatter plots can be created as follows:

x = np.random.normal((4, 1000))
R = np.random.random((4, 4))  # projection matrix
x = np.dot(R, x)
ax = MultiAxes(4)
ax.scatter(x)
ax.set_labels(['x1', 'x2', 'x3', 'x4'])

Alternatively, the scatter plot can be visualized as a density:

ax = MultiAxes(4)
ax.density(x, bins=[20, 20, 20, 20])

Methods

density(data[, bins])

Density plot of data

plot(data, *args, **kwargs)

Plot data

scatter(data, *args, **kwargs)

Scatter plot data

set_formatters(formatters)

Set the tick formatters for the outer edge of plots

set_labels(labels)

Set the axes labels

set_limits(limits)

Set the axes limits

set_locators(locators)

Set the tick locators for the plots

__init__(ndim, inner_labels=False, fig=None, left=None, bottom=None, right=None, top=None, wspace=None, hspace=None)[source]

Initialize self. See help(type(self)) for accurate signature.