kplot 1.1.24__tar.gz → 1.1.26__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: kplot
3
- Version: 1.1.24
3
+ Version: 1.1.26
4
4
  Summary: a matplotlib wrapper for keyan :-)
5
5
  Author: Keyan Gootkin
6
6
  Author-email: Keyan Gootkin <keyangootkin@gmail.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "kplot"
3
- version = "1.1.24"
3
+ version = "1.1.26"
4
4
  description = "a matplotlib wrapper for keyan :-)"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -1,7 +1,7 @@
1
1
  # !==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==
2
2
  # >-|===|> Imports <|===|-<
3
3
  # !==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==
4
- from kbasic.typing import Number, Iterable
4
+ from kbasic.typing import Number
5
5
  from matplotlib.pyplot import cm
6
6
  from matplotlib.colors import Colormap, LinearSegmentedColormap, ListedColormap, \
7
7
  hex2color, Normalize, LogNorm, FuncNorm, AsinhNorm, PowerNorm, SymLogNorm, \
@@ -9,6 +9,7 @@ from matplotlib.colors import Colormap, LinearSegmentedColormap, ListedColormap,
9
9
  from numpy import uint8, zeros, ndarray, inf, nanmin, nanmax, nanquantile, nanmean, \
10
10
  nanstd, absolute, log10, ones, linspace
11
11
  from colorist import ColorOKLCH
12
+ from collections.abc import Iterable
12
13
 
13
14
  # !==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==
14
15
  # >-|===|> Types <|===|-<
@@ -28,10 +28,10 @@ def ffmpeg(
28
28
  system(f"ffmpeg -loglevel 8 -framerate {fps} -pattern_type glob -i '{source+'/*.png'}' -c:v libx264 -pix_fmt yuv420p -y {file_path}")
29
29
  def func_video(
30
30
  video_name: str, fig: Figure, updater: Callable, N: int,
31
- frames: str = "./frames", destination: str = "./",
31
+ frames: str = f"./.temp", destination: str = "./",
32
32
  dpi: int = 100, fps: int = 30, verbose=True
33
33
  ) -> None:
34
- ensure_path(frames)
34
+ ensure_path(f"")
35
35
  if len(glob(f"{frames}/*.png"))>0: system(f"rm {frames}/*.png")
36
36
  ndigits = len(str(N))
37
37
  # if the size isn't divisible by 2 ffmpeg gets mad???
@@ -42,9 +42,10 @@ def func_video(
42
42
  # make the frames and save them to the frames directory
43
43
  for i in verbose_bar(range(N), verbose):
44
44
  updater(i)
45
- fig.savefig(f"{frames}/{str(i).zfill(ndigits)}.png", dpi=dpi)
45
+ fig.savefig(f"{frames}/{video_name}/{str(i).zfill(ndigits)}.png", dpi=dpi)
46
46
  # make the video
47
47
  ffmpeg(video_name, source=frames, destination=destination, fps=fps)
48
+ system(f'rm -r {frames}')
48
49
  def line_video(
49
50
  xs, ys,
50
51
  fname,
@@ -3,7 +3,8 @@
3
3
  # !==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==
4
4
  from kplot.axes import subplots
5
5
 
6
- from kbasic.typing import Number, Iterable, Optional
6
+ from collections.abc import Iterable
7
+ from kbasic.typing import Number, Optional
7
8
  from numpy import asarray, hstack, column_stack, newaxis, concatenate, hypot, diff,\
8
9
  nanmin, nanmax, ndarray, log10
9
10
  from matplotlib.figure import Figure
File without changes
File without changes
File without changes
File without changes
File without changes