11.1.1.2. astroML.plotting.scatter_contour

astroML.plotting.scatter_contour(x, y, levels=10, threshold=100, log_counts=False, histogram2d_args=None, plot_args=None, contour_args=None, filled_contour=True, ax=None)[source]

Scatter plot with contour over dense regions

Parameters
x, yarrays

x and y data for the contour plot

levelsinteger or array (optional, default=10)

number of contour levels, or array of contour levels

thresholdfloat (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_argsdict

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

plot_argsdict

keyword arguments passed to plt.plot. By default it will use dict(marker=’.’, linestyle=’none’). see doc string of pylab.plot for more information

contour_argsdict

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

filled_contourbool

If True (default) use filled contours. Otherwise, use contour outlines.

axpylab.Axes instance

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

Returns
points, contours :

points is the return value of ax.plot() contours is the return value of ax.contour or ax.contourf