This documentation is for astroML version 0.2

This page


astroML Mailing List

GitHub Issue Tracker


Scipy 2012 (15 minute talk)

Scipy 2013 (20 minute talk)


If you use the software, please consider citing astroML. astroML.plotting.scatter_contour

astroML.plotting.scatter_contour(x, y, levels=10, threshold=100, log_counts=False, histogram2d_args={}, plot_args={}, contour_args={}, ax=None)

Scatter plot with contour over dense regions

Parameters :

x, y : arrays

x and y data for the contour plot

levels : integer or array (optional, default=10)

number of contour levels, or array of contour levels

threshold : float (default=100)

number of points per 2D bin at which to begin drawing contours

log_counts :boolean (optional) :

if True, contour levels are the base-10 logarithm of bin counts.

histogram2d_args : dict

keyword arguments passed to numpy.histogram2d see doc string of numpy.histogram2d for more information

plot_args : dict

keyword arguments passed to pylab.scatter see doc string of pylab.scatter for more information

contourf_args : dict

keyword arguments passed to pylab.contourf see doc string of pylab.contourf for more information

ax : pylab.Axes instance

the axes on which to plot. If not specified, the current axes will be used