kplot 1.1.3__tar.gz → 1.1.4__tar.gz
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.
- {kplot-1.1.3 → kplot-1.1.4}/PKG-INFO +2 -1
- {kplot-1.1.3 → kplot-1.1.4}/pyproject.toml +2 -1
- {kplot-1.1.3 → kplot-1.1.4}/src/kplot/movie.py +4 -2
- {kplot-1.1.3 → kplot-1.1.4}/README.md +0 -0
- {kplot-1.1.3 → kplot-1.1.4}/src/kplot/__init__.py +0 -0
- {kplot-1.1.3 → kplot-1.1.4}/src/kplot/axes.py +0 -0
- {kplot-1.1.3 → kplot-1.1.4}/src/kplot/cmaps.py +0 -0
- {kplot-1.1.3 → kplot-1.1.4}/src/kplot/hist.py +0 -0
- {kplot-1.1.3 → kplot-1.1.4}/src/kplot/image.py +0 -0
- {kplot-1.1.3 → kplot-1.1.4}/src/kplot/plot.py +0 -0
- {kplot-1.1.3 → kplot-1.1.4}/src/kplot/styles/example.mpl +0 -0
- {kplot-1.1.3 → kplot-1.1.4}/src/kplot/styles/publication.mpl +0 -0
- {kplot-1.1.3 → kplot-1.1.4}/src/kplot/threeD/__init__.py +0 -0
- {kplot-1.1.3 → kplot-1.1.4}/src/kplot/threeD/slider_images.py +0 -0
- {kplot-1.1.3 → kplot-1.1.4}/src/kplot/utils.py +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "kplot"
|
|
3
|
-
version = "1.1.
|
|
3
|
+
version = "1.1.4"
|
|
4
4
|
description = "a matplotlib wrapper for keyan :-)"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
7
7
|
dependencies = [
|
|
8
|
+
"kbasic>=0.1.4",
|
|
8
9
|
"matplotlib>=3.10.8",
|
|
9
10
|
"numpy>=2.4.2",
|
|
10
11
|
]
|
|
@@ -5,6 +5,7 @@ from kplot.utils import column_width, two_column_width
|
|
|
5
5
|
from kplot.cmaps import auto_norm
|
|
6
6
|
from kplot.image import show
|
|
7
7
|
from kbasic.bar import verbose_bar
|
|
8
|
+
from kbasic.parsing import ensure_path
|
|
8
9
|
import matplotlib.pyplot as plt
|
|
9
10
|
from matplotlib.figure import Figure
|
|
10
11
|
import numpy as np
|
|
@@ -34,6 +35,7 @@ def func_video(
|
|
|
34
35
|
frames: str = "./frames", destination: str = "./",
|
|
35
36
|
dpi: int = 100, fps: int = 30, verbose=True
|
|
36
37
|
) -> None:
|
|
38
|
+
ensure_path(frames)
|
|
37
39
|
if len(glob(f"{frames}/*.png"))>0: system(f"rm {frames}/*.png")
|
|
38
40
|
ndigits = len(str(N))
|
|
39
41
|
# if the size isn't divisible by 2 ffmpeg gets mad???
|
|
@@ -64,7 +66,7 @@ def line_video(
|
|
|
64
66
|
def lines_video(
|
|
65
67
|
data,
|
|
66
68
|
fname,
|
|
67
|
-
destination: str = '.',
|
|
69
|
+
destination: str = '.', frames='./frames'
|
|
68
70
|
ax=None, figsize=(5,5),
|
|
69
71
|
fps=20, dpi=100
|
|
70
72
|
) -> None:
|
|
@@ -77,7 +79,7 @@ def lines_video(
|
|
|
77
79
|
def update(i: int) -> None:
|
|
78
80
|
for (x, y), line in zip(data, lines):
|
|
79
81
|
line.set_data(x[i], y[i])
|
|
80
|
-
func_video(fname, fig, update, len(data[0][0]), fps=fps, dpi=dpi, destination=destination)
|
|
82
|
+
func_video(fname, fig, update, len(data[0][0]), fps=fps, dpi=dpi, destination=destination, frames=frames)
|
|
81
83
|
def show_video(
|
|
82
84
|
frames: np.ndarray,
|
|
83
85
|
fname: str,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|