igl.viz
Optional plotting helpers. Requires the [viz] extra — importing any
submodule of igl.viz raises IGLDependencyError
when matplotlib is missing.
igl.viz.dimension_curve.plot_dimension_curve(curve, *, ax=None, elbow=None, title=None, label=None, log_y=True)
Plot a Matryoshka dimension curve.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
curve
|
DimensionCurve
|
|
required |
ax
|
Axes | None
|
Optional axes to draw on. Created via |
None
|
elbow
|
int | None
|
If provided, draw a vertical marker line at this |
None
|
title
|
str | None
|
Optional axes title. |
None
|
label
|
str | None
|
Optional line label (for use with multi-curve overlays). |
None
|
log_y
|
bool
|
Use a log-scale Y axis (the elbow is usually clearer on log). |
True
|
Returns:
| Type | Description |
|---|---|
Axes
|
The axes the curve was drawn on. |
igl.viz._matplotlib.require_matplotlib()
Raise :class:IGLDependencyError if matplotlib is not importable.