multi

MultiContrast Class

The MultiContrast class enables visualization of multiple contrast objects in grid-based layouts.


source

MultiContrast

 MultiContrast (dabest_objs:Union[List,List[List]],
                labels:Optional[List[str]]=None,
                row_labels:Optional[List[str]]=None,
                effect_size:str='mean_diff', ci_type:str='bca')

*Unified multiple contrast object for forest plots and whorlmaps.

Takes raw dabest objects and provides validated, processed data for downstream visualizations.*

Loading Function


source

combine

 combine (dabest_objs:Union[List,List[List]],
          labels:Optional[List[str]]=None,
          row_labels:Optional[List[str]]=None,
          effect_size:str='mean_diff', ci_type:str='bca',
          allow_mixed_types:bool=False)

*Create a MultiContrast object from raw dabest objects.

This is the main entry point that users should use to create multi-contrast visualizations.*

Type Default Details
dabest_objs Union Raw dabest objects in 1D or 2D structure
labels Optional None Labels for dabest_objs
row_labels Optional None
effect_size str mean_diff Effect size to extract
ci_type str bca Confidence interval type
allow_mixed_types bool False If True, allows different contrast types in different rows (whorlmap only)
If False, enforces homogeneous types (forest_plot compatible)
Returns MultiContrast Validated multi-contrast object ready for visualization

Whorlmap Visualization

The whorlmap creates spiral heatmaps showing the distribution of bootstrap samples for each contrast.


source

whorlmap

 whorlmap (multi_contrast, n=21, sort_by=None, cmap='vlag', vmax=None,
           vmin=None, reverse_neg=True, abs_rank=False, chop_tail=0,
           ax=None, fig_size=None, title=None, heatmap_kwargs=None,
           plot_kwargs=None)

Create a whorlmap visualization of multiple contrasts.

Type Default Details
multi_contrast MultiContrast Object containing multiple dabest objects
n int 21 Size of each spiral (n x n grid per contrast)
sort_by NoneType None Order to sort contrasts by
cmap str vlag
vmax NoneType None
vmin NoneType None
reverse_neg bool True Whether to reverse negative values
abs_rank bool False Whether to rank by absolute value
chop_tail int 0 Percentage of extreme values to exclude
ax NoneType None Existing axes to plot on
fig_size NoneType None Figure size (width, height) in inches
title NoneType None Plot title
heatmap_kwargs NoneType None Additional keyword arguments passed to sns.heatmap().
Common options include:
- ‘cmap’: colormap (overrides direct cmap parameter)
- ‘vmin’, ‘vmax’: color scale limits (override direct parameters)
- ‘center’: center value for colormap
- ‘annot’: whether to annotate cells with values
- ‘fmt’: format string for annotations
- ‘linewidths’: width of lines between cells
- ‘linecolor’: color of lines between cells
- ‘cbar’: whether to show colorbar
- ‘cbar_kws’: colorbar customization dict
- ‘square’: whether to make cells square
- ‘xticklabels’, ‘yticklabels’: tick label control
- ‘mask’: boolean array to mask cells
plot_kwargs NoneType None Additional keyword arguments for plot styling and layout.
Available options (WIP):
- ‘title’: plot title
- ‘xlabel’, ‘ylabel’: axis labels
- ‘xticklabels’, ‘yticklabels’: tick labels
- ‘xticklabels_rotation’, ‘yticklabels_rotation’: tick label rotation angles
- ‘xticklabels_ha’, ‘yticklabels_ha’: horizontal alignment