bebi103.viz.contour
- bebi103.viz.contour(X, Y, Z, levels=None, p=None, overlaid=False, cmap=None, overlay_grid=False, fill=False, fill_palette=None, fill_alpha=0.75, line_kwargs=None, **kwargs)
Make a contour plot, possibly overlaid on an image.
- Parameters
X (1D or 2D Numpy array) – If 1D, array of x-values. If 2D, array of x-values as would be produced using np.meshgrid().
Y (1D or 2D Numpy array) – If 1D, array of y-values. If 2D, array of y-values as would be produced using np.meshgrid().
Z (2D Numpy array) – Array of z-values.
levels (array_like) – Levels to plot, ranging from 0 to 1. The contour around a given level contains that fraction of the total probability if the contour plot is for a 2D probability density function. By default, the levels are given by the one, two, three, and four sigma levels corresponding to a marginalized distribution from a 2D Gaussian distribution.
p (bokeh plotting object, default None) – If not None, the contour are added to p. This option is not allowed if overlaid is True.
overlaid (bool, default False) – If True, Z is displayed as an image and the contours are overlaid.
cmap (str or list of hex colors, default None) – If im is an intensity image, cmap is a mapping of intensity to color. If None, default is 256-level Viridis. If im is a color image, then cmap can either be ‘rgb’ or ‘cmy’ (default), for RGB or CMY merge of channels.
overlay_grid (bool, default False) – If True, faintly overlay the grid on top of image. Ignored if overlaid is False.
line_kwargs (dict, default None) – Keyword arguments passed to p.multiline() for rendering the contour.
kwargs – Any kwargs to be passed to bokeh.plotting.figure().
- Returns
output – Plot populated with contours, possible with an image.
- Return type
Bokeh plotting object