gsplot.plot.line#
Deprecated forwarding shim for gsplot.plot.line.
Functions
|
Plot publication-ready lines on one or more explicit Axes. |
- line(target, x, y, *, series=None, label=None, c=None, marker='o', ms=7, mew=1.5, mec=None, mfc=None, alpha_mfc=0.2, ls='--', lw=1, alpha=1, config=None, props=None)#
Plot publication-ready lines on one or more explicit Axes.
- Parameters:
target (Axes | _AxesBase | Sequence[Axes | _AxesBase] | Mapping[Any, Axes | _AxesBase] | ndarray[tuple[int, ...], dtype[Any]]) β One Axes or a deterministic same-Figure collection of Axes.
x (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | Mapping[object, Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]]) β One finite one-dimensional pair broadcast to every target, or two exact-key mappings containing one pair per target.
y (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | Mapping[object, Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]]) β One finite one-dimensional pair broadcast to every target, or two exact-key mappings containing one pair per target.
series (Any) β Optional deterministic publication identity from 0 through 9.
label (Any) β Concise line controls. Scalars broadcast; exact-key mappings provide per-target colors, markers, and line styles.
c (Any) β Concise line controls. Scalars broadcast; exact-key mappings provide per-target colors, markers, and line styles.
marker (Any) β Concise line controls. Scalars broadcast; exact-key mappings provide per-target colors, markers, and line styles.
ms (Any) β Concise line controls. Scalars broadcast; exact-key mappings provide per-target colors, markers, and line styles.
mew (Any) β Concise line controls. Scalars broadcast; exact-key mappings provide per-target colors, markers, and line styles.
mec (Any) β Concise line controls. Scalars broadcast; exact-key mappings provide per-target colors, markers, and line styles.
mfc (Any) β Concise line controls. Scalars broadcast; exact-key mappings provide per-target colors, markers, and line styles.
alpha_mfc (Any) β Concise line controls. Scalars broadcast; exact-key mappings provide per-target colors, markers, and line styles.
ls (Any) β Concise line controls. Scalars broadcast; exact-key mappings provide per-target colors, markers, and line styles.
lw (Any) β Concise line controls. Scalars broadcast; exact-key mappings provide per-target colors, markers, and line styles.
alpha (Any) β Concise line controls. Scalars broadcast; exact-key mappings provide per-target colors, markers, and line styles.
config (Config | None) β Optional immutable configuration for omitted values.
props (Mapping[str, object] | None) β Optional closed advanced property mapping. It cannot duplicate a separately supplied direct field.
- Returns:
Native Matplotlib line results in normalized target order.
- Return type:
list[matplotlib.lines.Line2D]ortupleoflists- Raises:
DataError β If targets, data, series, or style values fail atomic preflight.
Notes
The target Axes cycle supplies color when both
seriesandcare omitted. Line and edge alpha are materialized in their RGBA colors; marker faces usealpha * alpha_mfcindependently, matching the 0.3 rendering contract. Long Matplotlib spellings and the names inLINE_ADVANCED_OPTIONSremain accepted through 1.x.Examples
>>> import gsplot as gs >>> figure, ax = gs.subplots() >>> artists = gs.line(ax, [0, 1], [1, 2], series=0, label="sample") >>> artists[0].axes is ax True >>> figure.clear()