API reference

imshow(*args, **kwargs) Adaptive heatmap version of Axes.imshow.
matshow(*args, **kwargs) Adaptive heatmap version of Axes.matshow.
pcolor(*args, **kwargs) Adaptive heatmap version of Axes.pcolor.
pcolormesh(*args, **kwargs) Adaptive heatmap version of Axes.pcolormesh.
hexbin(*args, **kwargs) Adaptive heatmap version of Axes.hexbin.
hist2d(*args, **kwargs) Adaptive heatmap version of Axes.hist2d.
cumhist(data[, normed, ylabel, ax]) Plot cumulative distribution of data.

High-level interface

adaptiveheatmap.imshow(*args, **kwargs)

Adaptive heatmap version of Axes.imshow.

Parameters:
Returns:

ahah.result holds whatever Axes.imshow returns.

Return type:

AdaptiveHeatmap

Examples

adaptiveheatmap.matshow(*args, **kwargs)

Adaptive heatmap version of Axes.matshow.

Parameters:
Returns:

ahah.result holds whatever Axes.matshow returns.

Return type:

AdaptiveHeatmap

Examples

adaptiveheatmap.pcolor(*args, **kwargs)

Adaptive heatmap version of Axes.pcolor.

Parameters:
Returns:

ahah.result holds whatever Axes.pcolor returns.

Return type:

AdaptiveHeatmap

Examples

adaptiveheatmap.pcolormesh(*args, **kwargs)

Adaptive heatmap version of Axes.pcolormesh.

Parameters:
Returns:

ahah.result holds whatever Axes.pcolormesh returns.

Return type:

AdaptiveHeatmap

Examples

adaptiveheatmap.hexbin(*args, **kwargs)

Adaptive heatmap version of Axes.hexbin.

Parameters:
Returns:

ahah.result holds whatever Axes.hexbin returns.

Return type:

AdaptiveHeatmap

Examples

adaptiveheatmap.hist2d(*args, **kwargs)

Adaptive heatmap version of Axes.hist2d.

Parameters:
Returns:

ahah.result holds whatever Axes.hist2d returns.

Return type:

AdaptiveHeatmap

Examples

adaptiveheatmap.cumhist(data, normed=True, ylabel=None, ax=None, **step_kwargs)

Plot cumulative distribution of data.

See also cdf.

Low-level interface

class adaptiveheatmap.AdaptiveHeatmap(ax_main, ax_cdf, cax_quantile, cax_original, gs=None)

Four-panel figure for visualizing heatmaps.

ax_main

matplotlib.axes.Axes – Axes to plot the heatmap.

ax_cdf

matplotlib.axes.Axes – Axes to plot the cumulative distribution function (CDF).

cax_quantile

matplotlib.axes.Axes – Vertical colorbar along the cumulative distribution function (CDF) axis.

cax_original

matplotlib.axes.Axes – Horizontal colorbar in the original Z-space.

figure

matplotlib.figure.Figure

norm

QuantileNormalize

contour(*args, **kwargs)

Run Axes.contour with adaptive heatmap colorbar.

Parameters:
Returns:

Return type:

Whatever Axes.contour returns.

contourf(*args, **kwargs)

Run Axes.contourf with adaptive heatmap colorbar.

Parameters:
Returns:

Return type:

Whatever Axes.contourf returns.

hexbin(*args, **kwargs)

Run Axes.hexbin with adaptive heatmap colorbar.

Parameters:
Returns:

Return type:

Whatever Axes.hexbin returns.

hist2d(*args, **kwargs)

Run Axes.hist2d with adaptive heatmap colorbar.

Parameters:
Returns:

Return type:

Whatever Axes.hist2d returns.

imshow(*args, **kwargs)

Run Axes.imshow with adaptive heatmap colorbar.

Parameters:
Returns:

Return type:

Whatever Axes.imshow returns.

classmethod make(cax_quantile_width_ratio=0.1, ax_cdf_width_ratio=0.5, cax_original_height_ratio=0.1, figure=None, **kwargs)

Create an AdaptiveHeatmap using GridSpec.

Parameters:
matshow(*args, **kwargs)

Run Axes.matshow with adaptive heatmap colorbar.

Parameters:
Returns:

Return type:

Whatever Axes.matshow returns.

pcolor(*args, **kwargs)

Run Axes.pcolor with adaptive heatmap colorbar.

Parameters:
Returns:

Return type:

Whatever Axes.pcolor returns.

pcolormesh(*args, **kwargs)

Run Axes.pcolormesh with adaptive heatmap colorbar.

Parameters:
Returns:

Return type:

Whatever Axes.pcolormesh returns.

relate_xyzq(x, y, marker='o', color='k', noline=False)

Plot auxiliary lines and points to relate data at (x, y).

set_qlabel(label)

Set “q-axis” label of ax_cdf.

set_xlabel(label)

Set x-axis label of ax_main.

set_ylabel(label)

Set y-axis label of ax_main.

set_zlabel(label)

Set “z-axis” label of cax_quantile.

class adaptiveheatmap.QuantileNormalize(qs=None, quantile=None, **kwargs)

Data normalization based on quantile function (inverse CDF).

qs

None, int or array – If an int, qs-quantiles are used; i.e., it is converted to an array by qs = numpy.linspace(0, 1, qs + 1). If an array, it must be an increasing sequence of numbers between 0 and 1 (qs * 100 is passed to numpy.nanpercentile). Note that usually qs should start at 0 (qs[0] == 0) and end at 1 (qs[-1] == 1) unless it is preferred to ignore extreme values.

quantile

array – Sorted values on the original data space.

vmin, vmax

float

clip

bool – See: matplotlib.colors.Normalize.

autoscale(data)

Set vmin, vmax to min, max of A.

autoscale_None(data)

autoscale only None-valued vmin or vmax.

scaled()

return true if vmin and vmax set