GraphingLib
GraphingLib is an open-source data visualization library in Python, designed as a wrapper for matplotlib. It integrates powerful data manipulation features from libraries such as scipy, shapely, and others.
GraphingLib has the following explicit goals:
- Simplify Plotting: Provide the simplest, most intuitive, and user-friendly API to enable users to create plots in as few lines of code as possible.
- Data Analysis Functions: Implement common data analysis functions and operations to streamline the visualization process.
- Custom Figure Styles: Facilitate the customization and reuse of figure styles.
How is GraphingLib different?
- Object-Oriented Plotting: Figures and plotted elements are all objects, making it easier to manage and manipulate plots and elements.
- Curve Fitting: Perform curve fitting with a single line of code.
- Curve Operations: Carry out differentiation, integration, arithmetic, intersections, and other standard operations on Curve objects.
- GUI Style Editor: Use the GraphingLib Style Editor to create and modify custom styles, and set them as your default style.
- Polygon Manipulation: Obtain useful information such as area, centroid, and perimeter of polygons, and manipulate them using transform and set operations methods.
- SmartFigures: Create modular figures with multiple sub-figures and an intuitive syntax.
Getting started
To get started with GraphingLib, check out our comprehensive documentation and examples available on our website. Whether you're a beginner or an experienced user, our documentation provides step-by-step guides to help you make the most out of GraphingLib. Here are a few ways to install GraphingLib:
From PyPI with
pip install graphinglib
From source with
pip install git+https://github.com/GraphingLib/GraphingLib.git
Using Poetry with
poetry add graphinglib
Using uv with
uv add graphinglib
Optional extras:
- Astronomical projections (SmartFigureWCS): install
pip install graphinglib[astro]
Contributing
We welcome contributions from the community. If you're interested in contributing to GraphingLib, please read our contribution guidelines on our documentation website.
Example
Here is a short example showing how to use GraphingLib to create a figure with a scatter plot, a fit, and a histogram of the residuals.
import graphinglib as gl
import numpy as np
# Data creation
np.random.seed(2)
x_data = np.linspace(0, 10, 100)
y_data = 3 * x_data**2 - 2 * x_data + np.random.normal(0, 10, 100)
# Create elements
scatter = gl.Scatter(x_data, y_data, label="Position data")
fit = gl.FitFromPolynomial(scatter, degree=2, label="Fit", color="red")
residuals = gl.Histogram.from_fit_residuals(fit, bins=15)
residuals.add_pdf("normal")
# Create and show figure
fig = gl.SmartFigure(
num_cols=2,
num_rows=1,
size=(10, 5),
y_lim=[None, (0, 0.06)],
sub_x_labels=["Time [s]", "Distance from fit [mm]"],
sub_y_labels=["Position [mm]", "Frequency [-]"],
subtitles=["Position as a function of time", "Histogram of fit residuals"],
)
fig[0] = [scatter, fit]
fig[1] = [residuals]
fig.show()
Metadata
Release files for graphinglib 1.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| graphinglib-1.6.1.tar.gz | 1.9 MB | Without provenance | Details for graphinglib-1.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| graphinglib-1.6.1-py3-none-any.whl | Python 3 | none | any | Details for graphinglib-1.6.1-py3-none-any.whl |
Total release size: 2.0 MB
Release files / graphinglib-1.6.1.tar.gz
| Download URL | graphinglib-1.6.1.tar.gz |
|---|---|
| Size | 1.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7eeb06be72d477936c04576e7034872329dce17e8bf59370514b95f4e66280a
|
|
BLAKE2b-256 checksum How to use checksums |
93a5f123707abe6e70463ca28089606241ca9d8e7da3ddaee1dbf009485e2f89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / graphinglib-1.6.1-py3-none-any.whl
| Download URL | graphinglib-1.6.1-py3-none-any.whl |
|---|---|
| Size | 124.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b995722e748942244be21284443c60f067107d7d8c6454e36dd338c72e1d7c30
|
|
BLAKE2b-256 checksum How to use checksums |
ad18980146d34c543bee51763647c4da7a9afbf74b21b8d3db8a23a73295e953
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for graphinglib 1.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.