uvisbox.Modules.ContourBoxplot.contour_boxplot ============================================== .. py:module:: uvisbox.Modules.ContourBoxplot.contour_boxplot Module Contents --------------- .. py:function:: contour_boxplot(ensemble_images, isovalue, boxplot_style=None, ax=None, eps=0, workers=11, x_coords=None, y_coords=None) Create a contour boxplot visualization from an ensemble of scalar fields. This function processes ensemble images by extracting binary contours at a given isovalue, computing their band depths, and visualizing the uncertainty using band envelopes. :param ensemble_images: 3D array of shape (n_ensemble, y_dim, x_dim) containing the ensemble scalar fields. :type ensemble_images: np.ndarray :param isovalue: Threshold value for creating binary images. Pixels with values < isovalue are set to 1. :type isovalue: float :param boxplot_style: Configuration for the boxplot visualization including percentiles, and median/outlier styling. If None, uses default configuration. The percentile_colormap is used for the band sum visualization. :type boxplot_style: BoxplotStyleConfig, optional :param ax: Matplotlib Axes object to plot on. If None, a new figure and axes will be created. :type ax: matplotlib.axes.Axes, optional :param eps: Epsilon tolerance for subset checks in band depth computation. With eps=0 (default), exact pixel-level containment is required, which can be too strict for continuously-varying rasterized contours. Values like 0.01-0.05 allow approximate containment. :type eps: float, optional :param workers: Number of parallel workers for band depth computation. Default is 11. :type workers: int, optional :param x_coords: 1D array of x-axis coordinates defining the spatial domain. Length must match the image width. If None, pixel indices are used. :type x_coords: np.ndarray, optional :param y_coords: 1D array of y-axis coordinates defining the spatial domain. Length must match the image height. If None, pixel indices are used. :type y_coords: np.ndarray, optional :returns: **ax** -- The Axes object with the contour boxplot visualization. :rtype: matplotlib.axes.Axes .. rubric:: Examples >>> # Basic usage with defaults >>> ensemble = np.random.randn(50, 100, 100) # 50 ensemble members >>> ax = contour_boxplot(ensemble, isovalue=0.5) >>> # Custom styling >>> from uvisbox.Core.CommonInterface import BoxplotStyleConfig >>> style = BoxplotStyleConfig( ... percentiles=[25, 50, 75], ... percentile_colormap='hot', ... show_median=True, ... show_outliers=True ... ) >>> ax = contour_boxplot(ensemble, isovalue=0.5, boxplot_style=style)