kplot 1.1.42__tar.gz → 1.1.43__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.42
3
+ Version: 1.1.43
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.42"
3
+ version = "1.1.43"
4
4
  description = "a matplotlib wrapper for keyan :-)"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -30,7 +30,9 @@ def ffmpeg(
30
30
  def func_video(
31
31
  video_name: str, fig: Figure, updater: Callable, N: int,
32
32
  frames: str = f"./.temp", destination: str = "./",
33
- dpi: int = 100, fps: int = 30, verbose=True, **updater_kwargs
33
+ dpi: int = 100, fps: int = 30, verbose=True,
34
+ vcodec='libx264', pix_fmt='yuv420p',
35
+ **updater_kwargs
34
36
  ) -> None:
35
37
  ensure_path(f"{frames}/{video_name}")
36
38
  if len(glob(f"{frames}/*.png"))>0: system(f"rm {frames}/*.png")
@@ -45,7 +47,11 @@ def func_video(
45
47
  updater(i, **updater_kwargs)
46
48
  fig.savefig(f"{frames}/{video_name}/{str(i).zfill(ndigits)}.png", dpi=dpi)
47
49
  # make the video
48
- ffmpeg(video_name, source=f"{frames}/{video_name}/", destination=destination, fps=fps)
50
+ ffmpeg(
51
+ video_name,
52
+ source=f"{frames}/{video_name}/", destination=destination,
53
+ fps=fps, vcodec=vcodec, pix_fmt=pix_fmt
54
+ )
49
55
  system(f'rm -r {frames}')
50
56
  def line_video(
51
57
  xs, ys,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes