Canonical API#

The root facade is the supported canonical import surface:

import gsplot as gs

The implementation packages under gsplot._* are private. Historical module URLs remain available as compatibility references during the 0.4.x and 1.x lines, but they are not part of this canonical API index.

Functions#

gsplot.subplots()

Create or reuse a native Figure with concise publication defaults.

gsplot.inset(parent, bounds, *[, label, ...])

Create a publication-styled inset on an explicit parent Axes.

gsplot.inset_axes(parent, spec)

Create one placement-only inset below an explicit parent Axes.

gsplot.line(target, x, y, *[, series, ...])

Plot publication-ready lines on one or more explicit Axes.

gsplot.scatter(target, x, y, *[, series, ...])

Plot publication-ready points on one or more explicit Axes.

gsplot.cmap_line(ax, x, y, values, *[, ...])

Draw a finite polyline whose segments are mapped through a colormap.

gsplot.cmap_dash(ax, x, y, values, *[, ...])

Draw a colormapped line with a local Matplotlib dash pattern.

gsplot.cmap_scatter(ax, x, y, values, *[, ...])

Create a scalar-colored native scatter collection.

gsplot.colors([n, cmap, reverse])

Return evenly spaced publication colors from a Matplotlib colormap.

gsplot.sample_cmap(name, *[, count, values, ...])

Sample a Matplotlib colormap as an (n, 4) RGBA array.

gsplot.label(target[, xlabel, ylabel, xlim, ...])

Set publication labels and optional panel geometry on explicit Axes.

gsplot.square(target[, aspect])

Apply a finite positive box aspect to explicit Axes.

gsplot.index()

Add deterministic lowercase panel indexes to explicit Axes.

gsplot.style_axes(target, spec)

Apply one validated AxisSpec to explicit Axes targets.

gsplot.title(ax, text, *[, props])

Set an explicit Axes title and return its native Text artist.

gsplot.suptitle(fig, text, *[, props])

Set an explicit Figure suptitle and return its native Text artist.

gsplot.minor_ticks(target, enabled, *[, ...])

Enable or disable minor ticks on explicit Axes targets.

gsplot.ticks(target, *[, minor, axis, top, ...])

Configure tick visibility, minor ticks, direction, and parameters.

gsplot.box_aspect(target, aspect)

Set or clear an explicit Axes box aspect.

gsplot.panel_labels(target[, labels, loc, props])

Add deterministic labels to an explicit ordered panel collection.

gsplot.paper(target, *[, cycle])

Apply the frozen publication baseline to explicit Axes only.

gsplot.fig_facecolor(fig, color)

Set one explicit Figure patch facecolor.

gsplot.legend(target, *[, handles, labels, ...])

Create publication legends on one or more explicit Axes.

gsplot.legends(target, *[, replace, props])

Create legends for explicit axes with discoverable entries.

gsplot.legend_entries(ax, *[, handler_map])

Return discovered handles and labels without creating or printing.

gsplot.cmap_legend(ax, *[, cmap, label, ...])

Create a local legend composed of finite colormap stripe proxies.

gsplot.set_theme(target, theme)

Apply a validated Theme only to an explicit Figure or Axes.

gsplot.save(target, path, *[, formats, dpi, ...])

Save one explicit Figure through a concise transactional workflow.

gsplot.savefig(fig, path, *[, formats, dpi, ...])

Save an explicit Figure and optionally display it after all writes.

gsplot.show(target)

Display only the unique Figure owned by an explicit target.

gsplot.load_config([path])

Load canonical configuration and translate one schema-less legacy file.

gsplot.read()

Read comma-delimited columns with finite NumPy text options.

gsplot.read_array(path, *[, loader, ndmin, ...])

Read a text array without changing the process working directory.

gsplot.write_meta(snapshot, destination, *)

Write one stable UTF-8 metadata document to an explicit destination.

gsplot.build_info()

Return only the installed gsplot version and a null commit value.

gsplot.use_backend(name)

Select a Matplotlib backend before pyplot or a figure is initialized.

Value types and errors#

gsplot.Config(*[, schema_version, figure, ...])

Immutable schema-versioned configuration for canonical operations.

gsplot.AxesDict

A dictionary of mosaic Axes supporting both label and integer index access.

gsplot.AxisSpec(*[, xlabel, ylabel, xlim, ...])

Immutable Cartesian labels, limits, scales, ticks, and padding.

gsplot.Theme(*[, figure_facecolor, ...])

Immutable explicit Figure/Axes appearance values.

gsplot.InsetSpec(*[, bounds, width, height, ...])

Immutable placement specification for an explicit parent Axes.

gsplot.MetadataSnapshot(package_version, *)

Immutable, privacy-bounded metadata for one explicit output.

gsplot.BuildInfo(version[, commit])

Immutable distribution metadata returned by build_info().

gsplot.LegendEntries(handles, labels[, ...])

Immutable handles, labels, and local legend handler mappings.

gsplot.GsplotError

Base class for errors that are part of the canonical API contract.

gsplot.ConfigError

Raised when configuration cannot be parsed or validated.

gsplot.DataError

Raised when plotting or numerical input violates the data contract.

gsplot.LayoutError

Raised when a figure or axes layout is invalid.

gsplot.PlotError

Raised when a plotting operation cannot be completed safely.

gsplot.OutputError(message, *[, committed_paths])

Raised when figure output or display cannot be completed.

gsplot.MetadataError

Raised when reproducibility metadata is invalid or cannot be written.

Type aliases#

gsplot.MosaicSpec

A subplot-mosaic string or rectangular sequence of label rows.

gsplot.NormalizeSpec

Finite color bounds or a Matplotlib-compatible normalizer.

gsplot.ColorSpec

A Matplotlib color name or an RGB or RGBA channel tuple.

gsplot.AxesTarget

One Axes or a deterministic finite collection of Axes.

gsplot.PerTarget

An ordered sequence or exact-key mapping of per-target values.

gsplot.LineStyle

A Matplotlib named line style or finite dash-tuple form.

gsplot.Marker

An input accepted by Matplotlib's MarkerStyle.

gsplot.Unit

A supported physical figure-size unit.

gsplot.SizePreset

An automatic publication canvas choice.

gsplot.SizeSpec

A publication preset, explicit dimensions, or ambient Figure size.

gsplot.LayoutMode

A supported Figure layout-engine selection.

gsplot.StyleMode

A concise target-local style selection.

gsplot.ZoomCorners

Two explicit parent-to-inset connector-corner pairs.

gsplot.Limit

A finite two-value axis limit whose order is preserved.

gsplot.Scale

A supported Cartesian axis scale name.

gsplot.TickSpec

A finite sequence of numeric tick locations.

gsplot.LabelRecord

Concise x/y labels with optional x/y axis limits.

gsplot.LabelRecords

Ordered or exact-key per-target label records.