Registry / data / plotbin

plotbin

JSON →
library3.1.8pypypi✓ verified 84d ago

The PlotBin package is a Python library, currently at version 3.1.8, developed by Michele Cappellari. It provides specialized utilities for plotting binned maps and other general two-dimensional data visualizations. Primarily aimed at scientific research and development, particularly in fields like astronomy and astrophysics, its documentation is embedded within the source code file headers. The project maintains an active status with irregular but consistent updates, with the latest release in September 2025.

pip install plotbin
INSTALL
IMPORT
SIG · PLOTBIN
P
plotbin
datapythonv3.1.8
Install
11.4s avg
Import
3338ms
Disk
321MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.1.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 3.425s · 318.9MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 11.4s · import 3.252s · 306MB
321MB installed
● package 321MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

display_bins
from plotbin.display_bins import display_bins
import plotbin.display_bins
The primary plotting functions are typically imported directly from submodules, not the top-level package or as a single module object.

This quickstart demonstrates how to generate a binned 2D map using `plotbin.display_bins`. It simulates random x, y coordinates and associated 'z' values, then visualizes their binned representation with Matplotlib. It assumes a basic setup where x, y, and z represent data points and their corresponding values in a 2D space.

import numpy as np from plotbin.display_bins import display_bins import matplotlib.pyplot as plt # Simulate some binned data (e.g., from a galaxy observation) x = np.random.rand(100) * 10 y = np.random.rand(100) * 10 z = np.sin(x/2) + np.cos(y/2) + np.random.rand(100) * 0.5 # Create a simple display_bins plot fig, ax = plt.subplots(figsize=(7, 6)) display_bins(x, y, z, ax=ax, cmap='viridis', textcolor='white') ax.set_title('Example Binned Map with PlotBin') ax.set_xlabel('X-coordinate') ax.set_ylabel('Y-coordinate') plt.colorbar(ax.collections[0], ax=ax, label='Value') plt.show()
Debug
Known issues
breakingOlder versions of 'plotbin' might have used different import paths, potentially leading to `ImportError`. A changelog from a related project (pafit) noted 'Changed imports for plotbin as package'.
fix
Ensure you are using the correct submodule import paths as shown in recent examples, e.g., `from plotbin.display_bins import display_bins`. Refer to the latest file headers for definitive import patterns.
affects: <= 2.x (approximate, specific version unknown)
gotchaThe PlotBin library is distributed under a restrictive, non-commercial license. Permission to use is for non-commercial purposes only, and redistribution of the code is not allowed.
fix
Review the license details on PyPI or in the source code file headers to ensure compliance with usage restrictions, especially for commercial projects or redistribution.
affects: All versions
gotchaOfficial documentation for PlotBin is primarily contained within the file headers of the source code, rather than a separate documentation website or extensive README.
fix
When seeking detailed usage, function signatures, or examples, consult the source code files directly after installation or by browsing the project's homepage if available.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'plotbin.display_bins'
The `plotbin` package or the `display_bins` submodule is not installed or the import path is incorrect. This can happen if an older version of plotbin was installed or the package structure changed.
fix
Verify that `plotbin` is installed (`pip show plotbin`). If installed, ensure your import statement matches the current package structure, e.g., `from plotbin.display_bins import display_bins`. If the error persists, consider reinstalling with `pip install --upgrade plotbin` to get the latest version.
TypeError: display_bins() got an unexpected keyword argument 'ax'
The `display_bins` function (or a similar plotting function) was called with an `ax` argument, but that specific version or function might not support directly passing a Matplotlib Axes object, or expects it as a positional argument.
fix
Check the function signature in the source code's file headers for the `display_bins` function to understand its expected arguments. If an `ax` argument is not supported, you might need to create the plot on the current active Axes or manually integrate it with Matplotlib's object-oriented interface. Update `plotbin` if a newer version supports the `ax` argument.
Upgrade
Version history
3.1.8latest on PyPI · released Sep 12, 2025
Audit
Dependencies
numpyrequiredRequired for numerical operations and data array handling, fundamental for binned map data.
matplotlibrequiredProvides the underlying plotting backend for generating visualizations.
Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
plotbin — pip install plotbin · libregistry