DDD Subplots
Python package making it easier to handle mixed 3d and 2d subplots.
How do I install this package?
As usual, just download it using pip:
pip install ddd_subplots
Usage Example
3D subplots
To get a set of 3d subplots just import subplots:
from ddd_subplots import subplots
fig, axes = subplots(1, 3, figsize=(15, 5))
Rotating 3D scatter plots
The library also offers a method to render 3D scatter plots. Here’s a complete example:
from ddd_subplots import subplots, rotate
import numpy as np
from sklearn import datasets
from sklearn.decomposition import PCA
def write_frame(X_reduced, y):
colors = np.array(["red", "green", "blue"])[y]
fig, axes = subplots(1, 3, figsize=(15, 5))
for axis in axes.flatten():
axis.scatter(*X_reduced.T, depthshade=False,
c=colors, marker='o', s=20)
fig.tight_layout()
return fig, axes
X, y = datasets.load_iris(return_X_y=True)
X_reduced = PCA(n_components=3).fit_transform(X)
rotate(
write_frame,
X_reduced,
"test_animation.gif",
y,
duration=10,
verbose=True
)
Output:
Metadata
Release files for ddd-subplots 1.0.27
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 |
|---|---|---|---|---|
| ddd_subplots-1.0.27.tar.gz | 7.2 kB | Without provenance | Details for ddd_subplots-1.0.27.tar.gz |
Release files / ddd_subplots-1.0.27.tar.gz
| Download URL | ddd_subplots-1.0.27.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
925a61b888ee0491650cac022f28059e415486022a8ec33329c0555a0429f649
|
|
BLAKE2b-256 checksum How to use checksums |
7caad172cb7741873370af77e03ab828ae45dd54f0140ba157c2f593718db6eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9
|
Security for ddd-subplots 1.0.27
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.