Python module to resample datasets before plotting with Plotille.
Project description
plotilleresample
Python module to resample datasets before plotting with Plotille.
Installation
Install with UV:
uv add plotilleresample
Usage
#!/usr/bin/env python3
import plotille
import plotilleresample
import math
from shutil import get_terminal_size
from vtclear import clear_screen
import numpy as np
w = get_terminal_size().columns - 20
h = get_terminal_size().lines - 7
r = 10000
res = np.random.normal(size=r)
# Here I'm testing stuffs with histograms.
# input("Histogram:")
# print(plotille.histogram(res, bins=w*2, width=w, height=h))
X = [i for i in range(r)]
Y = [math.sin(i / 100) * 100 for i in range(r)]
print(" · Scatter...")
xs, ys = plotilleresample.dim_reduction_scatter(X, Y, w, h)
print(" · Plot...")
xp, yp = plotilleresample.dim_reduction_plot(X, Y, w, h)
print(" --- READY ---")
print(f"Len plot.x {len(xp)}")
print(f"Len scatter.x {len(xs)}")
input("Plot:")
clear_screen()
print(plotille.plot(xp, yp, w, h))
input("Scatter:")
clear_screen()
print(plotille.plot(xs, ys, w, h))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
plotilleresample-0.5.tar.gz
(3.0 kB
view details)
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 plotilleresample-0.5.tar.gz.
File metadata
- Download URL: plotilleresample-0.5.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00469e1a9128dfaec883eac5c61519cfb07eb1fa808896af436c23a8b06c6108
|
|
| MD5 |
d413184797766b80eafe0a6e3614e7dc
|
|
| BLAKE2b-256 |
ca474224b89eca4dbb2bce0db3177f70278d3795522591de03fbff9262d9146b
|
File details
Details for the file plotilleresample-0.5-py3-none-any.whl.
File metadata
- Download URL: plotilleresample-0.5-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb5e4eef2c121a8264607c61cc452ffc8c3a65f9741ef9b6e458df109aca82fc
|
|
| MD5 |
9c1daa043f6f0080e1b477f6597b1224
|
|
| BLAKE2b-256 |
62f73b338b255ece938a7e04dbc465288359439c0be39bdfe0c0032ffb1ceb73
|