densitty 0.8.2__py3-none-any.whl → 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- densitty/__init__.py +9 -0
- densitty/ansi.py +0 -1
- densitty/axis.py +222 -59
- densitty/binning.py +200 -115
- densitty/colorbar.py +84 -0
- densitty/detect.py +142 -24
- densitty/{plot.py → plotting.py} +77 -19
- densitty/smoothing.py +315 -0
- densitty/truecolor.py +2 -1
- densitty/util.py +149 -124
- densitty/util.pyi +38 -0
- {densitty-0.8.2.dist-info → densitty-1.0.0.dist-info}/METADATA +11 -6
- densitty-1.0.0.dist-info/RECORD +18 -0
- {densitty-0.8.2.dist-info → densitty-1.0.0.dist-info}/WHEEL +1 -1
- densitty-0.8.2.dist-info/RECORD +0 -15
- {densitty-0.8.2.dist-info → densitty-1.0.0.dist-info}/licenses/LICENSE +0 -0
- {densitty-0.8.2.dist-info → densitty-1.0.0.dist-info}/top_level.txt +0 -0
densitty/util.pyi
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from decimal import Decimal
|
|
2
|
+
from typing import Any, Callable, NamedTuple, Protocol, Sequence, SupportsFloat
|
|
3
|
+
|
|
4
|
+
class FloatLike[T](SupportsFloat, Protocol):
|
|
5
|
+
def __lt__(self, __other: Any) -> bool: ...
|
|
6
|
+
def __le__(self, __other: Any) -> bool: ...
|
|
7
|
+
def __add__(self, __other: Any) -> T: ...
|
|
8
|
+
def __sub__(self, __other: Any) -> T: ...
|
|
9
|
+
def __radd__(self, __other: Any) -> T: ...
|
|
10
|
+
def __rsub__(self, __other: Any) -> T: ...
|
|
11
|
+
def __mul__(self, __other: Any) -> T: ...
|
|
12
|
+
def __rmul__(self, __other: Any) -> T: ...
|
|
13
|
+
def __truediv__(self, __other: Any) -> T: ...
|
|
14
|
+
def __abs__(self) -> T: ...
|
|
15
|
+
|
|
16
|
+
class ValueRange(NamedTuple):
|
|
17
|
+
min: Decimal
|
|
18
|
+
max: Decimal
|
|
19
|
+
|
|
20
|
+
type Vec = Sequence[FloatLike]
|
|
21
|
+
|
|
22
|
+
def clamp(x, min_x, max_x): ...
|
|
23
|
+
def clamp_rgb(rgb): ...
|
|
24
|
+
def interp(piecewise: Sequence[Vec], x: float) -> Vec: ...
|
|
25
|
+
def nearest(stepwise: Sequence, x: float): ...
|
|
26
|
+
def make_decimal(x: FloatLike) -> Decimal: ...
|
|
27
|
+
def sanitize_decimals(values: Sequence[Decimal]) -> Sequence[Decimal]: ...
|
|
28
|
+
def make_value_range(v: ValueRange | Sequence[FloatLike]) -> ValueRange: ...
|
|
29
|
+
def partial_first(f: Callable[[FloatLike, FloatLike], FloatLike]) -> Callable: ...
|
|
30
|
+
def partial_second(f: Callable[[FloatLike, FloatLike], FloatLike]) -> Callable: ...
|
|
31
|
+
def sfrexp10(value): ...
|
|
32
|
+
|
|
33
|
+
round_fractions: tuple[Decimal, ...]
|
|
34
|
+
|
|
35
|
+
def round_up_ish(value, round_fracs=...): ...
|
|
36
|
+
def roundness(value): ...
|
|
37
|
+
def roundness_ordered(values): ...
|
|
38
|
+
def most_round(values): ...
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: densitty
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: densitty - create textual 2-D density plots, heatmaps, and 2-D histograms in Python
|
|
5
5
|
Author: Bill Tompkins
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/BillTompkins/densitty
|
|
8
8
|
Keywords: densitty,ascii,ascii-art,plotting,terminal,Python
|
|
9
|
-
Classifier: Development Status ::
|
|
9
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
10
|
Classifier: Environment :: Console
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
18
|
Classifier: Programming Language :: Python :: 3.14
|
|
16
19
|
Classifier: Programming Language :: Python :: Free Threading :: 3 - Stable
|
|
17
20
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
|
-
Requires-Python: >=3.
|
|
21
|
+
Requires-Python: >=3.10
|
|
19
22
|
Description-Content-Type: text/markdown
|
|
20
23
|
License-File: LICENSE
|
|
21
24
|
Dynamic: license-file
|
|
22
25
|
|
|
23
26
|
<h1 align="center">densitty</h1>
|
|
24
|
-
<h2 align="center">
|
|
27
|
+
<h2 align="center">Terminal-based 2-D Histogram, Density Plots, and Heatmaps in Python</h2>
|
|
25
28
|
|
|
26
29
|
Generate 2-D histograms (density plots, heat maps, eye diagrams) similar to [matplotlib's hist2d](https://matplotlib.org/stable/gallery/statistics/hist.html "hist2d"), but with output in the terminal, and no external dependencies.
|
|
27
30
|
|
|
@@ -29,8 +32,10 @@ Generate 2-D histograms (density plots, heat maps, eye diagrams) similar to [mat
|
|
|
29
32
|
|
|
30
33
|
## [Examples/Gallery](https://billtompkins.github.io/densitty/docs/examples.html)
|
|
31
34
|
|
|
32
|
-
## [
|
|
35
|
+
## [Usage Notes](https://billtompkins.github.io/densitty/docs/usage.html)
|
|
33
36
|
|
|
34
37
|
## [Color, Size, and Glyph Support](https://billtompkins.github.io/densitty/docs/terminal_support.html)
|
|
35
38
|
|
|
36
|
-
## API
|
|
39
|
+
## [API](https://billtompkins.github.io/densitty/docs/api.html)
|
|
40
|
+
|
|
41
|
+
## [GitHub](https://github.com/BillTompkins/densitty/tree/main)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
densitty/__init__.py,sha256=BeG85uFYNLaO6TaG-Q1zWgllq9SJfgH1fyKTixSz3Lw,336
|
|
2
|
+
densitty/ansi.py,sha256=fm6yHRszx0sF-inGurtxC_-TL0dvePLcSQ8r-Okm20w,3660
|
|
3
|
+
densitty/ascii_art.py,sha256=-MUppQkEeCAqSxdLCfuDRD1NKtzSrJAt2WdJEL56_fI,589
|
|
4
|
+
densitty/axis.py,sha256=1yv3ohhzF7hICGu8dB3zluD5i0U7-X9E8A2TxzJMgSU,17372
|
|
5
|
+
densitty/binning.py,sha256=6r0NCMKVs6lGl_7Uec4WXuI0yYDHYqkuyjKsOx2burk,13343
|
|
6
|
+
densitty/colorbar.py,sha256=63XIm-KQm1Dzh_vp5rgU7fmsIdcgfmfEKjQJdll8FEU,2247
|
|
7
|
+
densitty/detect.py,sha256=tARq3Uhv_r8V4Xtjvdnbgq16esKdzXzOJCKZb1eu3MI,22241
|
|
8
|
+
densitty/lineart.py,sha256=Qkw_F1QEK9yd0ttNjg62bomIavMPza3pk8w7DA85zWs,4124
|
|
9
|
+
densitty/plotting.py,sha256=u8GJQIHECpR-ayDDirabVAZS9Mrw9rxIYgnC2wK83e8,10427
|
|
10
|
+
densitty/smoothing.py,sha256=r-fjRQmEO9OZxBN7Y5f1FFzUGPh0OYixHM6AUt1Rui4,12284
|
|
11
|
+
densitty/truecolor.py,sha256=6UDLJRUKP8rProemJyfSIgtZ5IdB1v8R_PV41fW6CjA,6016
|
|
12
|
+
densitty/util.py,sha256=nCVQAUNNK6VrG32GmqJ7ZU2OeWcWDpD_vMmGCe2llqU,8291
|
|
13
|
+
densitty/util.pyi,sha256=3nELig5yUy6b_cxb-3tjEIzmWHFNa7DX5sf3RGd0p-k,1436
|
|
14
|
+
densitty-1.0.0.dist-info/licenses/LICENSE,sha256=LexlQlxS7F07WxcVOOmZAZ_3vReYv0cM8Zg6pTx7_fI,1073
|
|
15
|
+
densitty-1.0.0.dist-info/METADATA,sha256=Ugrt_V4ljCRkjn5ipr87lxpvxS5i91IDqrqbW_xSMIU,1922
|
|
16
|
+
densitty-1.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
17
|
+
densitty-1.0.0.dist-info/top_level.txt,sha256=Q50fHzFeZkhO_61VVAIJZyKU44Upacx_blojlLpYqNo,9
|
|
18
|
+
densitty-1.0.0.dist-info/RECORD,,
|
densitty-0.8.2.dist-info/RECORD
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
densitty/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
densitty/ansi.py,sha256=YHagUsCwbyNlOkV2pXJuxolWwjvs1E4hxMnJaohqTfE,3661
|
|
3
|
-
densitty/ascii_art.py,sha256=-MUppQkEeCAqSxdLCfuDRD1NKtzSrJAt2WdJEL56_fI,589
|
|
4
|
-
densitty/axis.py,sha256=XANbgvOltS0XhUvUB9dfUBvybEfOmcjI5xGc2NZDgak,10120
|
|
5
|
-
densitty/binning.py,sha256=LioKw7A0xK_lzUEY2tINiL4fySxVNllxrgh2bD4T9AA,9549
|
|
6
|
-
densitty/detect.py,sha256=LBRUDHxpqLq3p0zRUNS7-3YCBSyclfM0vVy0ZmzSVNs,17725
|
|
7
|
-
densitty/lineart.py,sha256=Qkw_F1QEK9yd0ttNjg62bomIavMPza3pk8w7DA85zWs,4124
|
|
8
|
-
densitty/plot.py,sha256=dxdPRensTxWd9CcD2SbekqAe0iOMcKSKR24wrNc5aCw,8340
|
|
9
|
-
densitty/truecolor.py,sha256=uSrT4Qm0T0ZFwXxm1oyNTrdNCDO7ZfUTI687bX5r-8I,5990
|
|
10
|
-
densitty/util.py,sha256=U0B5RSxQOdq5M6no3OC_buZizAcVjTPwwqKvk4QJ5Rc,7888
|
|
11
|
-
densitty-0.8.2.dist-info/licenses/LICENSE,sha256=LexlQlxS7F07WxcVOOmZAZ_3vReYv0cM8Zg6pTx7_fI,1073
|
|
12
|
-
densitty-0.8.2.dist-info/METADATA,sha256=QK1lEOpas0eZ86enDAObh3bxuS1GoQ_Gmk5X2c6lgpg,1646
|
|
13
|
-
densitty-0.8.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
14
|
-
densitty-0.8.2.dist-info/top_level.txt,sha256=Q50fHzFeZkhO_61VVAIJZyKU44Upacx_blojlLpYqNo,9
|
|
15
|
-
densitty-0.8.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|