gsplot.style.legend_colormap#
Deprecated forwarding shim for gsplot.style.legend_colormap.
Functions
|
Create a v0.2-compatible horizontal gradient Legend. |
- legend_colormap(ax, cmap='viridis', label=None, num_stripes=8, vmin=0, vmax=1, reverse=False, **props)#
Create a v0.2-compatible horizontal gradient Legend.
- Parameters:
ax (Axes) – Explicit target Axes.
cmap (str) – Non-empty registered Matplotlib colormap name.
label (str | None) – Optional gradient label.
Nonereturns an empty Legend.num_stripes (int) – Positive requested stripe count; values above 256 are clamped.
vmin (float) – Finite raw values passed directly to the colormap through
linspace(vmin, vmax, N_effective). Equal and descending bounds are valid and retain their sampled order.vmax (float) – Finite raw values passed directly to the colormap through
linspace(vmin, vmax, N_effective). Equal and descending bounds are valid and retain their sampled order.reverse (bool) – Reverse the final sampled RGBA sequence from left to right.
**props (Any) – Finite Matplotlib Legend properties. If omitted, Matplotlib’s call-time rcParams provide the defaults.
- Return type:
Legend
Notes
This deprecated adapter always replaces an existing Legend because the historical function has no
replacekeyword. Its rendering helper is shared withgsplot.cmap_legend(), but its rawvmin/vmaxsampling is deliberately not translated to canonicalnormsemantics.