Table of Contents
alltheplots
provides an extremely simple Python interface for creating quick visualizations from numerical arrays, automatically detecting dimensionality (1D, 2D, 3D, 4D, nD) and providing commonly used plots.
The core goal of alltheplots
is to abstract away the plotting details, letting you instantly visualize your data without having to remember specific plot types or parameters. It wraps seaborn
and matplotlib
, providing a user-friendly layer which typically sensible default plots.
- Simple: Single public
.plot()
function. - Automatic: Detects array dimensionality and chooses appropriate plots automatically.
- Flexible: Supports numpy-like arrays from libraries such as
numpy
,pytorch
,TensorFlow
,jax
, andcupy
seamlessly. - Minimal dependencies: built on top of
matplotlib
,numpy
,scipy
,seaborn
,scikit-learn
, andumap-learn
.
You can install the latest release using pip:
pip install alltheplots
Alternatively, install directly from source (Git required):
git clone https://github.com/gomezzz/alltheplots.git
cd alltheplots
pip install -e .
Below are a few quick examples demonstrating typical usage.
Generate standard plots automatically based on the dimensionality of your data.
import numpy as np
from alltheplots import plot
data = np.random.randn(1000)
plot(data)
You can easily save plots to file:
plot(data, filename="my_plot.png", dpi=300)
Users are encouraged to manage the visual style externally by setting global themes in matplotlib
or seaborn
. For example:
import seaborn as sns
import matplotlib.pyplot as plt
sns.set_theme(style="ticks", palette="deep")
plt.style.use("dark_background")
# Then call the plot function
plot(data)
This approach provides more flexibility and aligns with best practices for managing plot aesthetics.
For more detailed examples, check out the notebooks in the examples/
directory:
- 1D Examples - Visualizing 1D arrays with time-domain, frequency-domain, and distribution plots
- 2D Examples - Visualizing 2D arrays with heatmaps, contours, and 3D surface plots
- 3D Examples - Visualizing 3D arrays with slice views, projections, and distribution analysis
- nD Examples - Visualizing high-dimensional arrays with dimensionality reduction techniques
These notebooks provide comprehensive examples of the various visualization capabilities and can help you understand how to best use the library for your specific data.
matplotlib
- Core plotting librarynumpy
- Array manipulationscipy
- Scientific computingseaborn
- Statistical data visualizationscikit-learn
- Machine learning for dimensionality reductionumap-learn
- UMAP dimensionality reduction for high-dimensional dataloguru
- Logging
Contributions are welcome! Please open issues and submit PRs at the GitHub repository.
Distributed under the GPL 3 License. See LICENSE
for more information.