plotting¶
pycatdap.plotting ¶
v0.2 compatibility shim for the legacy pycatdap.plotting import path.
The canonical path for visualization in v0.3+ is pycatdap.plot
(with backend dispatch) or pycatdap.plot.matplotlib (direct).
This shim re-exports the matplotlib backend functions so that existing v0.2 user code continues to work without modification:
from pycatdap.plotting import mosaic_plot # still works from pycatdap.plot.matplotlib import mosaic_plot # canonical from pycatdap.plot import mosaic_plot # backend dispatcher
This shim is preserved through v1.0. v1.0 will add a DeprecationWarning
on use, and v2.0 may remove this module.
aic_comparison_plot ¶
aic_comparison_plot(
result: Catdap1Result | Catdap2Result,
response: str | None = None,
ax: Axes | None = None,
**kwargs: Any,
) -> Axes
Horizontal bar chart of ΔAIC values per explanatory variable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
Catdap1Result or Catdap2Result
|
Analysis result. |
required |
response
|
str or None
|
Response variable name. Required for |
None
|
ax
|
Axes or None
|
Matplotlib axes. Created if |
None
|
**kwargs
|
Any
|
Passed to :meth: |
{}
|
Returns:
| Type | Description |
|---|---|
Axes
|
|
Source code in src/pycatdap/plot/matplotlib.py
barplot_twoway ¶
Stacked proportional bar chart for a two-way frequency table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
table
|
DataFrame
|
Cross-frequency table (e.g. from |
required |
ax
|
Axes or None
|
Matplotlib axes. Created if |
None
|
**kwargs
|
Any
|
Passed to :meth: |
{}
|
Returns:
| Type | Description |
|---|---|
Axes
|
|
Source code in src/pycatdap/plot/matplotlib.py
mosaic_plot ¶
Mosaic plot for a two-way frequency table.
Uses statsmodels.graphics.mosaicplot if available, otherwise
falls back to a proportional rectangle plot with matplotlib.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
table
|
DataFrame
|
Cross-frequency table. |
required |
ax
|
Axes or None
|
Matplotlib axes. Created if |
None
|
**kwargs
|
Any
|
Passed to the underlying plot function. |
{}
|
Returns:
| Type | Description |
|---|---|
Axes
|
|