km3pipe.plot

Common Plotting utils.

Module Contents

Functions

get_ax([ax])

Grab last ax if none specified, or pass through.

diag([ax, linecolor, linestyle])

Plot the diagonal.

automeshgrid(x, y[, step, xstep, ystep, pad, xpad, ypad])

Make a meshgrid, inferred from data.

meshgrid(x_min, x_max, x_step[, y_min, y_max, y_step])

Make a meshgrid, e.g. when plotting decision surfaces.

bincenters(bins)

Bincenters, assuming they are all equally spaced.

prebinned_hist(counts, binlims[, ax])

Plot a histogram with counts, binlims already given.

plot_convexhull(xy[, ax, plot_points])

km3pipe.plot.get_ax(ax=None)[source]

Grab last ax if none specified, or pass through.

km3pipe.plot.diag(ax=None, linecolor='0.0', linestyle='--', **kwargs)[source]

Plot the diagonal.

km3pipe.plot.automeshgrid(x, y, step=0.02, xstep=None, ystep=None, pad=0.5, xpad=None, ypad=None)[source]

Make a meshgrid, inferred from data.

km3pipe.plot.meshgrid(x_min, x_max, x_step, y_min=None, y_max=None, y_step=None)[source]

Make a meshgrid, e.g. when plotting decision surfaces.

km3pipe.plot.bincenters(bins)[source]

Bincenters, assuming they are all equally spaced.

km3pipe.plot.prebinned_hist(counts, binlims, ax=None, *args, **kwargs)[source]

Plot a histogram with counts, binlims already given.

Examples

>>> gaus = np.random.normal(size=100)
>>> counts, binlims = np.histogram(gaus, bins='auto')
>>> prebinned_hist(countsl binlims)
km3pipe.plot.plot_convexhull(xy, ax=None, plot_points=True)[source]