gsplot
gsplot is a small scientific-plotting toolkit built on Matplotlib. It adds
convenient figure layouts, consistent styling helpers, configurable defaults,
and lightweight version/configuration metadata while keeping ordinary
Matplotlib Figure and Axes objects in the workflow.
The package is still evolving. Check the documentation and the issue tracker before depending on behavior that is not covered by the public API.
Install
gsplot supports Python 3.10 and newer:
python -m pip install gsplot
Quick example
import gsplot as gs
axes = gs.axes(size=(8, 4), mosaic="AB", store=True)
gs.line(axes[0], [0, 1, 2], [0, 1, 4], label="quadratic")
gs.scatter(axes[1], [0, 1, 2], [0, 1, 4], label="samples")
gs.legend_axes()
gs.show("quickstart", show=False)
This creates a two-panel Matplotlib figure, saves quickstart.png when
storage is enabled, and remains compatible with regular Matplotlib operations:
axes[0].set_title("A regular Matplotlib Axes")
For a complete scientific example, see the paper-plot demo.
Configuration
Place a gsplot.json file in the working directory, or in
~/.config/gsplot/gsplot.json, to provide defaults for supported functions.
The first matching location is used. A path can also be loaded explicitly:
import gsplot as gs
gs.config_load("path/to/gsplot.json")
When a value is specified more than once, the precedence is:
- an argument passed directly to the function;
- the corresponding function entry in
gsplot.json; - the function's default value.
See the configuration guide for the supported file layout and backend notes.
Development
The repository uses Poetry and targets Python 3.10 or newer. With a compatible Python interpreter:
python -m pip install "poetry==2.4.1"
poetry install
MPLBACKEND=Agg poetry run pytest -q
MPLBACKEND=Agg poetry run sphinx-build -W -b html docs docs/_build/html
The demos under demo/ are executable documentation. Run one from its own
directory, for example:
cd demo/1_axes
python axes.py
See the developer setup guide for formatting, type checking, packaging, and Docker instructions.
For private vulnerability reports and the supported-version policy, see SECURITY.md.
Authors
This repository was forked from code developed by Giordano Mattoni.
- Giordano Mattoni
- Soichiro Yamane
License
This project is distributed under the MIT License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gsplot-0.3.0.tar.gz.
File metadata
- Download URL: gsplot-0.3.0.tar.gz
- Upload date:
- Size: 53.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3ccc284c0e3d5bb6c133ee635e183601603b31e766ba4f41763fe671e86c2a8
|
|
| MD5 |
bfe8b5dde64189f0fbda3d21cf0a11d4
|
|
| BLAKE2b-256 |
56a7e81d08c8130340a5b20d02ecfb5ed1609a08b7adc629272a16c4fdcb7c3c
|
Provenance
The following attestation bundles were made for gsplot-0.3.0.tar.gz:
Publisher:
publish_package.yml on SoichiroYamane/gsplot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gsplot-0.3.0.tar.gz -
Subject digest:
e3ccc284c0e3d5bb6c133ee635e183601603b31e766ba4f41763fe671e86c2a8 - Sigstore transparency entry: 2421818729
- Sigstore integration time:
-
Permalink:
SoichiroYamane/gsplot@6d44cf7a61f77a42c2bb1ec20aeb2a16ffccdad4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/SoichiroYamane
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_package.yml@6d44cf7a61f77a42c2bb1ec20aeb2a16ffccdad4 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file gsplot-0.3.0-py3-none-any.whl.
File metadata
- Download URL: gsplot-0.3.0-py3-none-any.whl
- Upload date:
- Size: 71.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
538fb5266235716043d415b8bdbf3cd3e7ae3c7708e6701a97ae7ef929404846
|
|
| MD5 |
68c2bf17fb5e7b7a1c4e12fc508cd78a
|
|
| BLAKE2b-256 |
9fa3a57e64aafa98c8b047b560729962b2100b0833f6c32aee3dd801a3eaef48
|
Provenance
The following attestation bundles were made for gsplot-0.3.0-py3-none-any.whl:
Publisher:
publish_package.yml on SoichiroYamane/gsplot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gsplot-0.3.0-py3-none-any.whl -
Subject digest:
538fb5266235716043d415b8bdbf3cd3e7ae3c7708e6701a97ae7ef929404846 - Sigstore transparency entry: 2421818851
- Sigstore integration time:
-
Permalink:
SoichiroYamane/gsplot@6d44cf7a61f77a42c2bb1ec20aeb2a16ffccdad4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/SoichiroYamane
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_package.yml@6d44cf7a61f77a42c2bb1ec20aeb2a16ffccdad4 -
Trigger Event:
workflow_dispatch
-
Statement type: