gsplot.load_config#

load_config(path=None)#

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

Parameters:

path (str | PathLike[str] | None) – Explicit JSON configuration file, or None to discover the first documented gsplot.json candidate.

Returns:

A fresh immutable configuration value.

Return type:

Config

Raises:

ConfigError – If the selected file is missing, malformed, or violates the target schema. A schema-less legacy file is translated with a warning.

Examples

>>> import gsplot as gs
>>> config = gs.load_config(path=None)
>>> config.schema_version
2

The canonical file format requires integer schema_version 2. A schema-less file is accepted only through this root compatibility boundary, translated to the reviewed subset, and accompanied by a deprecation warning. No legacy rcParams or function-entry state is applied.