statanim 0.1.4__tar.gz → 0.1.6__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.
Files changed (71) hide show
  1. {statanim-0.1.4/statanim.egg-info → statanim-0.1.6}/PKG-INFO +1 -1
  2. {statanim-0.1.4 → statanim-0.1.6}/pyproject.toml +1 -1
  3. {statanim-0.1.4 → statanim-0.1.6}/statanim/axes/axes3d.py +2 -1
  4. {statanim-0.1.4 → statanim-0.1.6}/statanim/axes/grid3d.py +2 -1
  5. {statanim-0.1.4 → statanim-0.1.6}/statanim/axes/number_plane3d.py +2 -1
  6. {statanim-0.1.4 → statanim-0.1.6}/statanim/charts/bar_chart3d.py +2 -1
  7. {statanim-0.1.4 → statanim-0.1.6}/statanim/charts/box_plot3d.py +2 -1
  8. {statanim-0.1.4 → statanim-0.1.6}/statanim/charts/heat_map3d.py +2 -1
  9. {statanim-0.1.4 → statanim-0.1.6}/statanim/charts/histogram3d.py +2 -1
  10. {statanim-0.1.4 → statanim-0.1.6}/statanim/charts/line_plot3d.py +2 -1
  11. {statanim-0.1.4 → statanim-0.1.6}/statanim/charts/scatter_plot3d.py +2 -1
  12. {statanim-0.1.4 → statanim-0.1.6}/statanim/charts/violin_plot3d.py +2 -1
  13. {statanim-0.1.4 → statanim-0.1.6}/statanim/core/base.py +2 -1
  14. {statanim-0.1.4 → statanim-0.1.6}/statanim/core/colors.py +1 -0
  15. {statanim-0.1.4 → statanim-0.1.6}/statanim/distributions/base_dist.py +2 -1
  16. {statanim-0.1.4 → statanim-0.1.6}/statanim/distributions/cdf_viz.py +2 -1
  17. {statanim-0.1.4 → statanim-0.1.6}/statanim/distributions/continuous_dists.py +2 -1
  18. {statanim-0.1.4 → statanim-0.1.6}/statanim/distributions/discrete_dists.py +2 -1
  19. {statanim-0.1.4 → statanim-0.1.6}/statanim/inference/confidence_interval.py +2 -1
  20. {statanim-0.1.4 → statanim-0.1.6}/statanim/inference/error_types.py +2 -1
  21. {statanim-0.1.4 → statanim-0.1.6}/statanim/inference/hypothesis.py +2 -1
  22. {statanim-0.1.4 → statanim-0.1.6}/statanim/inference/sampling_dist.py +2 -1
  23. {statanim-0.1.4 → statanim-0.1.6}/statanim/probability/bayes.py +2 -1
  24. {statanim-0.1.4 → statanim-0.1.6}/statanim/probability/prob_tree.py +2 -1
  25. {statanim-0.1.4 → statanim-0.1.6}/statanim/probability/sample_space.py +2 -1
  26. {statanim-0.1.4 → statanim-0.1.6}/statanim/probability/venn3d.py +2 -1
  27. {statanim-0.1.4 → statanim-0.1.6}/statanim/props/card.py +2 -1
  28. {statanim-0.1.4 → statanim-0.1.6}/statanim/props/coin.py +6 -5
  29. {statanim-0.1.4 → statanim-0.1.6}/statanim/props/die.py +3 -2
  30. {statanim-0.1.4 → statanim-0.1.6}/statanim/props/spinner.py +6 -5
  31. {statanim-0.1.4 → statanim-0.1.6}/statanim/props/urn.py +6 -5
  32. {statanim-0.1.4 → statanim-0.1.6}/statanim/regression/correlation.py +2 -1
  33. {statanim-0.1.4 → statanim-0.1.6}/statanim/regression/regression_plane.py +2 -1
  34. {statanim-0.1.4 → statanim-0.1.6}/statanim/regression/residuals.py +2 -1
  35. {statanim-0.1.4 → statanim-0.1.6}/statanim/scenes/demo_bayes.py +2 -1
  36. {statanim-0.1.4 → statanim-0.1.6}/statanim/scenes/demo_clt.py +2 -1
  37. {statanim-0.1.4 → statanim-0.1.6}/statanim/scenes/demo_distributions.py +2 -1
  38. {statanim-0.1.4 → statanim-0.1.6}/statanim/scenes/demo_hypothesis.py +2 -1
  39. {statanim-0.1.4 → statanim-0.1.6}/statanim/ui/labels.py +2 -1
  40. {statanim-0.1.4 → statanim-0.1.6}/statanim/ui/panels.py +2 -1
  41. {statanim-0.1.4 → statanim-0.1.6}/statanim/ui/table3d.py +2 -1
  42. {statanim-0.1.4 → statanim-0.1.6}/statanim/ui/ticker.py +2 -1
  43. {statanim-0.1.4 → statanim-0.1.6/statanim.egg-info}/PKG-INFO +1 -1
  44. {statanim-0.1.4 → statanim-0.1.6}/LICENSE +0 -0
  45. {statanim-0.1.4 → statanim-0.1.6}/README.md +0 -0
  46. {statanim-0.1.4 → statanim-0.1.6}/setup.cfg +0 -0
  47. {statanim-0.1.4 → statanim-0.1.6}/statanim/__init__.py +0 -0
  48. {statanim-0.1.4 → statanim-0.1.6}/statanim/animations/__init__.py +0 -0
  49. {statanim-0.1.4 → statanim-0.1.6}/statanim/animations/clt_demo.py +0 -0
  50. {statanim-0.1.4 → statanim-0.1.6}/statanim/animations/flip_roll.py +0 -0
  51. {statanim-0.1.4 → statanim-0.1.6}/statanim/animations/sampling.py +0 -0
  52. {statanim-0.1.4 → statanim-0.1.6}/statanim/animations/transitions.py +0 -0
  53. {statanim-0.1.4 → statanim-0.1.6}/statanim/axes/__init__.py +0 -0
  54. {statanim-0.1.4 → statanim-0.1.6}/statanim/charts/__init__.py +0 -0
  55. {statanim-0.1.4 → statanim-0.1.6}/statanim/core/__init__.py +0 -0
  56. {statanim-0.1.4 → statanim-0.1.6}/statanim/core/math_utils.py +0 -0
  57. {statanim-0.1.4 → statanim-0.1.6}/statanim/core/tex_utils.py +0 -0
  58. {statanim-0.1.4 → statanim-0.1.6}/statanim/distributions/__init__.py +0 -0
  59. {statanim-0.1.4 → statanim-0.1.6}/statanim/distributions/normal3d.py +0 -0
  60. {statanim-0.1.4 → statanim-0.1.6}/statanim/distributions/pdf_viz.py +0 -0
  61. {statanim-0.1.4 → statanim-0.1.6}/statanim/distributions/pmf_viz.py +0 -0
  62. {statanim-0.1.4 → statanim-0.1.6}/statanim/inference/__init__.py +0 -0
  63. {statanim-0.1.4 → statanim-0.1.6}/statanim/probability/__init__.py +0 -0
  64. {statanim-0.1.4 → statanim-0.1.6}/statanim/props/__init__.py +0 -0
  65. {statanim-0.1.4 → statanim-0.1.6}/statanim/regression/__init__.py +0 -0
  66. {statanim-0.1.4 → statanim-0.1.6}/statanim/scenes/__init__.py +0 -0
  67. {statanim-0.1.4 → statanim-0.1.6}/statanim/ui/__init__.py +0 -0
  68. {statanim-0.1.4 → statanim-0.1.6}/statanim.egg-info/SOURCES.txt +0 -0
  69. {statanim-0.1.4 → statanim-0.1.6}/statanim.egg-info/dependency_links.txt +0 -0
  70. {statanim-0.1.4 → statanim-0.1.6}/statanim.egg-info/requires.txt +0 -0
  71. {statanim-0.1.4 → statanim-0.1.6}/statanim.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: statanim
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: A Manim extension for animated statistical visualisations — distributions, regression, probability, inference and more.
5
5
  Author-email: Rishabh Bhartiya <rishabh.bhartiya.in@gmail.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "statanim"
7
- version = "0.1.4"
7
+ version = "0.1.6"
8
8
  description = "A Manim extension for animated statistical visualisations — distributions, regression, probability, inference and more."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -68,7 +68,7 @@ from manim import (
68
68
  WHITE, BLACK, GRAY, GRAY_A, GRAY_B, GRAY_C,
69
69
  DEGREES, PI, TAU,
70
70
  # Utilities
71
- interpolate_color, normalize,
71
+ interpolate_color as _ic, normalize,
72
72
  rotation_matrix, angle_of_vector,
73
73
  smooth, rate_functions, there_and_back,
74
74
  DecimalNumber, Integer,
@@ -76,6 +76,7 @@ from manim import (
76
76
  ThreeDAxes, NumberPlane,
77
77
  always_redraw, ValueTracker,
78
78
  )
79
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
79
80
 
80
81
  from ..core.base import (
81
82
  StatsObject3D, StatsProp3D,
@@ -70,12 +70,13 @@ from manim import (
70
70
  RIGHT, LEFT, UP, DOWN, OUT, IN,
71
71
  WHITE, BLACK, GRAY, BLUE, GREEN, RED, YELLOW,
72
72
  ORIGIN, X_AXIS, Y_AXIS, Z_AXIS,
73
- interpolate_color, color_to_rgba, rgba_to_color,
73
+ interpolate_color as _ic, color_to_rgba, rgba_to_color,
74
74
  ManimColor, color_to_rgb,
75
75
  AnimationGroup, LaggedStart, Create, FadeIn, DrawBorderThenFill,
76
76
  Scene,
77
77
  config,
78
78
  )
79
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
79
80
 
80
81
  # ---------------------------------------------------------------------------
81
82
  # Internal colour helpers
@@ -75,10 +75,11 @@ from manim import (
75
75
  ORIGIN, UP, DOWN, LEFT, RIGHT, IN, OUT,
76
76
  DEGREES, PI, TAU, WHITE, BLACK,
77
77
  # Utils
78
- interpolate_color, normalize,
78
+ interpolate_color as _ic, normalize,
79
79
  rotation_matrix, smooth, there_and_back,
80
80
  ValueTracker, always_redraw,
81
81
  )
82
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
82
83
 
83
84
  from ..core.base import (
84
85
  StatsObject3D,
@@ -82,11 +82,12 @@ from manim import (
82
82
  X_AXIS, Y_AXIS, Z_AXIS,
83
83
  WHITE, BLACK, GRAY, BLUE, GREEN, RED, YELLOW,
84
84
  # Colour utilities
85
- ManimColor, color_to_rgb, interpolate_color,
85
+ ManimColor, color_to_rgb, interpolate_color as _ic,
86
86
  rgba_to_color, color_to_rgba,
87
87
  # Utilities
88
88
  rate_functions,
89
89
  )
90
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
90
91
 
91
92
  # Re-use colour helpers from grid3d (copy inline to keep the module
92
93
  # self-contained when grid3d is not yet importable in a fresh checkout)
@@ -95,11 +95,12 @@ from manim import (
95
95
  X_AXIS, Y_AXIS, Z_AXIS,
96
96
  WHITE, BLACK, GRAY, BLUE, GREEN, RED, YELLOW,
97
97
  # Colour utilities
98
- ManimColor, color_to_rgb, interpolate_color,
98
+ ManimColor, color_to_rgb, interpolate_color as _ic,
99
99
  rgba_to_color, color_to_rgba,
100
100
  # Utilities
101
101
  rate_functions, smooth,
102
102
  )
103
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
103
104
 
104
105
  # ---------------------------------------------------------------------------
105
106
  # Shared colour helpers — self-contained copy for module independence
@@ -98,10 +98,11 @@ from manim import (
98
98
  Text, MathTex,
99
99
  FadeIn, FadeOut, GrowFromPoint, Transform,
100
100
  Create, AnimationGroup, Succession, LaggedStart,
101
- interpolate_color,
101
+ interpolate_color as _ic,
102
102
  ManimColor,
103
103
  DEGREES,
104
104
  )
105
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
105
106
 
106
107
 
107
108
  # ---------------------------------------------------------------------------
@@ -34,10 +34,11 @@ from manim import (
34
34
  FadeIn, FadeOut, GrowFromPoint, Transform,
35
35
  Create, Write, AnimationGroup, Succession, LaggedStart,
36
36
  always_redraw, ValueTracker,
37
- interpolate_color, color_to_rgb, rgb_to_color,
37
+ interpolate_color as _ic, color_to_rgb, rgb_to_color,
38
38
  ManimColor, color_gradient,
39
39
  DEGREES,
40
40
  )
41
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
41
42
 
42
43
 
43
44
  # ---------------------------------------------------------------------------
@@ -105,12 +105,13 @@ from manim import (
105
105
  X_AXIS, Y_AXIS, Z_AXIS,
106
106
  WHITE, BLACK, GRAY, BLUE, GREEN, RED, YELLOW,
107
107
  # Colour utilities
108
- ManimColor, color_to_rgb, interpolate_color,
108
+ ManimColor, color_to_rgb, interpolate_color as _ic,
109
109
  rgba_to_color, color_to_rgba,
110
110
  # Utilities
111
111
  rate_functions,
112
112
  smooth,
113
113
  )
114
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
114
115
 
115
116
  # ---------------------------------------------------------------------------
116
117
  # Shared colour helpers (self-contained copy — see bar_chart3d.py for origin)
@@ -51,10 +51,11 @@ from manim import (
51
51
  FadeIn, FadeOut, GrowFromCenter, Transform,
52
52
  Create, Write, AnimationGroup, Succession, LaggedStart,
53
53
  ValueTracker, always_redraw,
54
- interpolate_color, color_to_rgb, rgb_to_color,
54
+ interpolate_color as _ic, color_to_rgb, rgb_to_color,
55
55
  ManimColor, Rotate, rate_functions,
56
56
  DEGREES, Arrow, Dot,
57
57
  )
58
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
58
59
 
59
60
 
60
61
  # ---------------------------------------------------------------------------
@@ -83,10 +83,11 @@ from manim import (
83
83
  FadeIn, FadeOut, GrowFromCenter, GrowFromPoint, Transform,
84
84
  Create, Write, AnimationGroup, Succession, LaggedStart,
85
85
  ValueTracker,
86
- interpolate_color,
86
+ interpolate_color as _ic,
87
87
  ManimColor,
88
88
  DEGREES,
89
89
  )
90
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
90
91
 
91
92
 
92
93
  # ---------------------------------------------------------------------------
@@ -61,13 +61,14 @@ from manim import (
61
61
  ORANGE, PURPLE, TEAL, MAROON, GOLD, PINK,
62
62
  DEGREES, PI, TAU,
63
63
  # Utility
64
- interpolate_color, color_to_rgba, rgba_to_color,
64
+ interpolate_color as _ic, color_to_rgba, rgba_to_color,
65
65
  normalize, angle_of_vector, rotation_matrix,
66
66
  there_and_back, smooth, rush_from, rush_into,
67
67
  # Scene config
68
68
  config,
69
69
  rate_functions,
70
70
  )
71
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
71
72
 
72
73
 
73
74
  # ─────────────────────────────────────────────────────────────────────────────
@@ -7,6 +7,7 @@ Architecture
7
7
  ------------
8
8
  Layer 0 StatColor — single color with accessibility utilities
9
9
  Layer 1 ColorFamily — semantically grouped color ramp (base/light/dark/muted…)
10
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
10
11
  Layer 2 DistributionPalette— per-distribution-family curated palettes
11
12
  Layer 3 StatsTheme — full scene theme (bg, axes, grid, annotation, …)
12
13
  Layer 4 Manim helpers — gradient ramps, colormaps, diverging maps
@@ -88,9 +88,10 @@ from manim import (
88
88
  ORIGIN, UP, DOWN, LEFT, RIGHT, IN, OUT,
89
89
  DEGREES, PI, TAU,
90
90
  WHITE, BLACK, GRAY,
91
- interpolate_color, smooth, there_and_back,
91
+ interpolate_color as _ic, smooth, there_and_back,
92
92
  ValueTracker, always_redraw, rate_functions,
93
93
  )
94
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
94
95
 
95
96
  from ..core.base import (
96
97
  StatsObject3D, StatsChart3D,
@@ -59,9 +59,10 @@ from manim import (
59
59
  ORIGIN, UP, DOWN, LEFT, RIGHT, IN, OUT,
60
60
  DEGREES, PI, TAU,
61
61
  WHITE, BLACK, GRAY,
62
- interpolate_color, smooth, there_and_back,
62
+ interpolate_color as _ic, smooth, there_and_back,
63
63
  ValueTracker, rate_functions,
64
64
  )
65
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
65
66
 
66
67
  from ..core.base import (
67
68
  StatsObject3D,
@@ -54,9 +54,10 @@ from manim import (
54
54
  UpdateFromAlphaFunc,
55
55
  ORIGIN, UP, DOWN, LEFT, RIGHT, IN, OUT,
56
56
  DEGREES, PI, TAU,
57
- interpolate_color, smooth, there_and_back,
57
+ interpolate_color as _ic, smooth, there_and_back,
58
58
  ValueTracker, always_redraw,
59
59
  )
60
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
60
61
 
61
62
  from ..core.base import (
62
63
  StatsTheme, StatsColorPalette,
@@ -57,8 +57,9 @@ from manim import (
57
57
  DEGREES, PI,
58
58
  smooth, there_and_back,
59
59
  ValueTracker,
60
- interpolate_color,
60
+ interpolate_color as _ic,
61
61
  )
62
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
62
63
 
63
64
  from ..core.base import (
64
65
  StatsTheme, StatsColorPalette,
@@ -99,7 +99,7 @@ from manim import (
99
99
  Rotate,
100
100
  Create, Write, Uncreate,
101
101
  always_redraw,
102
- interpolate_color,
102
+ interpolate_color as _ic,
103
103
  color_to_rgb,
104
104
  WHITE, BLACK,
105
105
  GREY, GREY_A, GREY_B, GREY_C, GREY_D, LIGHT_GREY,
@@ -116,6 +116,7 @@ from manim import (
116
116
  ManimColor,
117
117
  ValueTracker,
118
118
  )
119
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
119
120
 
120
121
  # ──────────────────────────────────────────────────────────────────────────────
121
122
  # Colour themes
@@ -110,7 +110,7 @@ from manim import (
110
110
  Create, Write, Uncreate,
111
111
  Indicate, Flash,
112
112
  ValueTracker,
113
- interpolate_color, color_to_rgb,
113
+ interpolate_color as _ic, color_to_rgb,
114
114
  always_redraw,
115
115
  WHITE, BLACK,
116
116
  GREY, GREY_A, GREY_B, GREY_C, GREY_D,
@@ -126,6 +126,7 @@ from manim import (
126
126
  rate_functions,
127
127
  ManimColor,
128
128
  )
129
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
129
130
 
130
131
  # ─────────────────────────────────────────────────────────────────────────────
131
132
  # scipy — graceful fallback
@@ -120,7 +120,7 @@ from manim import (
120
120
  Create, Write, Uncreate,
121
121
  Indicate, Flash,
122
122
  Rotate,
123
- interpolate_color, color_to_rgb,
123
+ interpolate_color as _ic, color_to_rgb,
124
124
  WHITE, BLACK,
125
125
  GREY, GREY_A, GREY_B, GREY_C, GREY_D,
126
126
  RED, RED_A, RED_B, RED_C, RED_D, RED_E,
@@ -136,6 +136,7 @@ from manim import (
136
136
  ManimColor,
137
137
  VMobject,
138
138
  )
139
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
139
140
 
140
141
  # ─────────────────────────────────────────────────────────────────────────────
141
142
  # scipy — graceful fallback
@@ -115,7 +115,7 @@ from manim import (
115
115
  Create, Write,
116
116
  Indicate, Flash,
117
117
  ValueTracker,
118
- interpolate_color, color_to_rgb,
118
+ interpolate_color as _ic, color_to_rgb,
119
119
  always_redraw,
120
120
  WHITE, BLACK,
121
121
  GREY, GREY_A, GREY_B, GREY_C, GREY_D,
@@ -132,6 +132,7 @@ from manim import (
132
132
  ManimColor,
133
133
  VMobject,
134
134
  )
135
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
135
136
 
136
137
  # ─────────────────────────────────────────────────────────────────────────────
137
138
  # scipy — graceful fallback
@@ -96,10 +96,11 @@ from manim import (
96
96
  Text, MathTex,
97
97
  FadeIn, FadeOut, GrowFromPoint, GrowFromCenter, Transform,
98
98
  Create, Write, AnimationGroup, Succession, LaggedStart,
99
- interpolate_color,
99
+ interpolate_color as _ic,
100
100
  ManimColor,
101
101
  DEGREES,
102
102
  )
103
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
103
104
 
104
105
 
105
106
  # ---------------------------------------------------------------------------
@@ -88,10 +88,11 @@ from manim import (
88
88
  Text, MathTex,
89
89
  FadeIn, FadeOut, GrowFromCenter, GrowFromPoint, Transform,
90
90
  Create, Write, AnimationGroup, Succession, LaggedStart,
91
- interpolate_color,
91
+ interpolate_color as _ic,
92
92
  ManimColor,
93
93
  DEGREES,
94
94
  )
95
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
95
96
 
96
97
 
97
98
  # ---------------------------------------------------------------------------
@@ -94,10 +94,11 @@ from manim import (
94
94
  Text, MathTex,
95
95
  FadeIn, FadeOut, GrowFromCenter, GrowFromPoint, Transform,
96
96
  Create, Write, AnimationGroup, Succession, LaggedStart,
97
- interpolate_color,
97
+ interpolate_color as _ic,
98
98
  ManimColor,
99
99
  DEGREES,
100
100
  )
101
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
101
102
 
102
103
 
103
104
  # ---------------------------------------------------------------------------
@@ -100,10 +100,11 @@ from manim import (
100
100
  Text, MathTex,
101
101
  FadeIn, FadeOut, GrowFromCenter, GrowFromPoint, Transform,
102
102
  Create, Write, AnimationGroup, Succession, LaggedStart,
103
- interpolate_color,
103
+ interpolate_color as _ic,
104
104
  ManimColor,
105
105
  DEGREES,
106
106
  )
107
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
107
108
 
108
109
 
109
110
  # ---------------------------------------------------------------------------
@@ -81,7 +81,7 @@ try:
81
81
  MoveAlongPath, ArcBetweenPoints,
82
82
  rate_functions,
83
83
  # Colors
84
- interpolate_color,
84
+ interpolate_color as _ic,
85
85
  )
86
86
  _MANIM_AVAILABLE = True
87
87
  except ImportError:
@@ -90,6 +90,7 @@ except ImportError:
90
90
  VGroup = VMobject = object # type: ignore
91
91
 
92
92
 
93
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
93
94
  def _require_manim(method_name: str) -> None:
94
95
  if not _MANIM_AVAILABLE:
95
96
  raise ImportError(
@@ -53,7 +53,7 @@ from manim import (
53
53
  # Updaters / value trackers
54
54
  ValueTracker,
55
55
  # Colour helpers
56
- color_to_rgba, interpolate_color,
56
+ color_to_rgba, interpolate_color as _ic,
57
57
  # Common colours
58
58
  WHITE, BLACK, GOLD, GOLD_A, GOLD_B, GOLD_C, GOLD_D, GOLD_E,
59
59
  GREY, GREY_A, GREY_B, GREY_C, LIGHT_GREY,
@@ -66,6 +66,7 @@ from manim import (
66
66
  # Typing
67
67
  ManimColor,
68
68
  )
69
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
69
70
  from manim.utils.color import ManimColor, color_to_rgb
70
71
  from typing import Literal, Optional
71
72
  import warnings
@@ -203,7 +204,7 @@ class _CoinEdge(VGroup):
203
204
  self.add(edge_cyl)
204
205
 
205
206
  # ── Reed grooves (dark thin strips) ───────────────────────────
206
- groove_color = interpolate_color(color, BLACK, 0.35)
207
+ groove_color = interpolate_color(ManimColor(color), BLACK, 0.35)
207
208
  groove_w = TAU * radius / reed_count * 0.38 # ~38 % of pitch = dark
208
209
  reeds = VGroup()
209
210
  for i in range(reed_count):
@@ -293,7 +294,7 @@ class _CoinFace(VGroup):
293
294
 
294
295
  # ── 4. Radial engraving lines ─────────────────────────────────
295
296
  n_lines = 36
296
- groove_col = interpolate_color(palette["body"], BLACK, 0.22)
297
+ groove_col = interpolate_color(ManimColor(palette["body"]), BLACK, 0.22)
297
298
  engravings = VGroup()
298
299
  for i in range(n_lines):
299
300
  ang = i * TAU / n_lines
@@ -423,7 +424,7 @@ class _CoinFace(VGroup):
423
424
  ]:
424
425
  dot = Circle(
425
426
  radius=size * 0.08,
426
- fill_color=interpolate_color(color, WHITE, 0.5),
427
+ fill_color=interpolate_color(ManimColor(color), WHITE, 0.5),
427
428
  fill_opacity=1,
428
429
  stroke_width=0,
429
430
  )
@@ -446,7 +447,7 @@ class _CoinFace(VGroup):
446
447
  )
447
448
  g.add(shield)
448
449
  # Inner cross (lighter)
449
- cross_col = interpolate_color(color, WHITE, 0.45)
450
+ cross_col = interpolate_color(ManimColor(color), WHITE, 0.45)
450
451
  h_bar = Polygon(
451
452
  [-size * 0.7, size * 0.15, 0],
452
453
  [ size * 0.7, size * 0.15, 0],
@@ -74,7 +74,7 @@ from manim import (
74
74
  Animation, Succession, AnimationGroup,
75
75
  Rotate, ApplyMethod, FadeIn, FadeOut,
76
76
  ValueTracker,
77
- interpolate_color,
77
+ interpolate_color as _ic,
78
78
  WHITE, BLACK,
79
79
  GREY, GREY_A, GREY_B, GREY_C, GREY_D, LIGHT_GREY,
80
80
  BLUE, BLUE_A, BLUE_B, BLUE_C, BLUE_D, BLUE_E,
@@ -88,6 +88,7 @@ from manim import (
88
88
  rate_functions,
89
89
  ManimColor,
90
90
  )
91
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
91
92
 
92
93
  # ──────────────────────────────────────────────────────────────────────────────
93
94
  # Colour Palettes
@@ -345,7 +346,7 @@ class _PipWell(VGroup):
345
346
  super().__init__(**kwargs)
346
347
 
347
348
  well_col = palette["pip_1"] if is_red else palette["pip_well"]
348
- rim_col = interpolate_color(well_col, palette["pip_rim"], 0.5)
349
+ rim_col = interpolate_color(ManimColor(well_col), ManimColor(palette["pip_rim"]), 0.5)
349
350
  floor_col = palette["pip_floor"] if not is_red else interpolate_color(
350
351
  palette["pip_1"], WHITE, 0.25)
351
352
 
@@ -88,7 +88,7 @@ from manim import (
88
88
  Text, MathTex, Tex,
89
89
  Animation, Succession, AnimationGroup,
90
90
  ApplyMethod, Rotate, FadeIn, FadeOut,
91
- interpolate_color, color_to_rgb,
91
+ interpolate_color as _ic, color_to_rgb,
92
92
  WHITE, BLACK,
93
93
  GREY, GREY_A, GREY_B, GREY_C, GREY_D, LIGHT_GREY,
94
94
  RED, RED_A, RED_B, RED_C, RED_D,
@@ -103,6 +103,7 @@ from manim import (
103
103
  rate_functions,
104
104
  ManimColor,
105
105
  )
106
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
106
107
 
107
108
  # ──────────────────────────────────────────────────────────────────────────────
108
109
  # Default sector colour cycle
@@ -497,8 +498,8 @@ class _SpinnerSectors(VGroup):
497
498
 
498
499
  col = (colors[i % len(colors)] if colors
499
500
  else SECTOR_COLORS[i % len(SECTOR_COLORS)])
500
- dark_col = interpolate_color(col, BLACK, 0.32)
501
- lite_col = interpolate_color(col, WHITE, 0.28)
501
+ dark_col = interpolate_color(ManimColor(col), BLACK, 0.32)
502
+ lite_col = interpolate_color(ManimColor(col), WHITE, 0.28)
502
503
 
503
504
  self._sector_angles.append((mid_ang, a_start, a_end))
504
505
  self._sector_colors.append(col)
@@ -673,7 +674,7 @@ class _SpinnerHub(VGroup):
673
674
  self.add(Line(
674
675
  start=[r0 * np.cos(ang), r0 * np.sin(ang), z0 + 0.003],
675
676
  end =[r1 * np.cos(ang), r1 * np.sin(ang), z0 + 0.003],
676
- stroke_color=interpolate_color(hp["bearing"], BLACK, 0.25),
677
+ stroke_color=interpolate_color(ManimColor(hp["bearing"]), BLACK, 0.25),
677
678
  stroke_width=0.6,
678
679
  stroke_opacity=0.60,
679
680
  ))
@@ -803,7 +804,7 @@ class _SpinnerNeedle(VGroup):
803
804
  # ── Tip cap ───────────────────────────────────────────────────
804
805
  tip_cap = Circle(
805
806
  radius=hw * 0.22,
806
- fill_color=interpolate_color(np_["body"], WHITE, 0.45),
807
+ fill_color=interpolate_color(ManimColor(np_["body"]), WHITE, 0.45),
807
808
  fill_opacity=1.0,
808
809
  stroke_width=0,
809
810
  )
@@ -81,7 +81,7 @@ from manim import (
81
81
  ApplyMethod, FadeIn, FadeOut, MoveAlongPath,
82
82
  Rotate,
83
83
  CubicBezier,
84
- interpolate_color, color_to_rgb,
84
+ interpolate_color as _ic, color_to_rgb,
85
85
  WHITE, BLACK,
86
86
  GREY, GREY_A, GREY_B, GREY_C, GREY_D, LIGHT_GREY,
87
87
  RED, RED_A, RED_B, RED_C,
@@ -96,6 +96,7 @@ from manim import (
96
96
  ParametricFunction,
97
97
  Surface,
98
98
  )
99
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
99
100
 
100
101
  # ──────────────────────────────────────────────────────────────────────────────
101
102
  # Colour Palettes ── Urn body
@@ -361,9 +362,9 @@ class Ball3D(VGroup):
361
362
  self.ball_radius = radius
362
363
  self.label_text = label
363
364
 
364
- dark_col = interpolate_color(hex_col, BLACK, 0.60)
365
- light_col = interpolate_color(hex_col, WHITE, 0.55)
366
- rim_col = interpolate_color(hex_col, WHITE, 0.35)
365
+ dark_col = interpolate_color(ManimColor(hex_col), BLACK, 0.60)
366
+ light_col = interpolate_color(ManimColor(hex_col), WHITE, 0.55)
367
+ rim_col = interpolate_color(ManimColor(hex_col), WHITE, 0.35)
367
368
 
368
369
  # ── 1. Shadow hemisphere cap (bottom dark zone) ───────────────
369
370
  # Approximate with a dark-filled sphere slightly smaller and offset
@@ -784,7 +785,7 @@ class _UrnHandle(VGroup):
784
785
  for y_att in [low_y, high_y]:
785
786
  disc = Circle(
786
787
  radius=handle_thick * 1.3,
787
- fill_color=interpolate_color(handle_col, BLACK, 0.2),
788
+ fill_color=interpolate_color(ManimColor(handle_col), BLACK, 0.2),
788
789
  fill_opacity=1.0,
789
790
  stroke_width=0,
790
791
  )
@@ -74,9 +74,10 @@ try:
74
74
  Rotate, Flash, Indicate, Circumscribe,
75
75
  AnimationGroup, Succession, LaggedStart,
76
76
  rate_functions,
77
- interpolate_color,
77
+ interpolate_color as _ic,
78
78
  SurroundingRectangle,
79
79
  )
80
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
80
81
  _MANIM_AVAILABLE = True
81
82
  except ImportError:
82
83
  _MANIM_AVAILABLE = False
@@ -134,10 +134,11 @@ try:
134
134
  Rotate, Flash, Indicate,
135
135
  AnimationGroup, Succession, LaggedStart,
136
136
  rate_functions,
137
- interpolate_color,
137
+ interpolate_color as _ic,
138
138
  # Camera
139
139
  GrowFromCenter,
140
140
  )
141
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
141
142
  _MANIM_AVAILABLE = True
142
143
  except ImportError:
143
144
  _MANIM_AVAILABLE = False
@@ -95,9 +95,10 @@ try:
95
95
  Rotate, Flash, Indicate,
96
96
  AnimationGroup, Succession, LaggedStart,
97
97
  rate_functions,
98
- interpolate_color,
98
+ interpolate_color as _ic,
99
99
  SurroundingRectangle,
100
100
  )
101
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
101
102
  _MANIM_AVAILABLE = True
102
103
  except ImportError:
103
104
  _MANIM_AVAILABLE = False
@@ -91,7 +91,7 @@ from manim import (
91
91
  Transform, ReplacementTransform,
92
92
  MoveToTarget,
93
93
  ValueTracker,
94
- interpolate_color, color_to_rgb,
94
+ interpolate_color as _ic, color_to_rgb,
95
95
  always_redraw,
96
96
  BLACK, WHITE,
97
97
  GREY, GREY_A, GREY_B, GREY_C, GREY_D,
@@ -110,6 +110,7 @@ from manim import (
110
110
  NumberLine,
111
111
  DEGREES,
112
112
  )
113
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
113
114
 
114
115
  # ─────────────────────────────────────────────────────────────────────────────
115
116
  # Optional urn import (graceful fallback to plain shapes if unavailable)
@@ -88,7 +88,7 @@ from manim import (
88
88
  Rotate,
89
89
  Transform, ReplacementTransform,
90
90
  ValueTracker,
91
- interpolate_color, color_to_rgb,
91
+ interpolate_color as _ic, color_to_rgb,
92
92
  always_redraw,
93
93
  BLACK, WHITE,
94
94
  GREY, GREY_A, GREY_B, GREY_C, GREY_D,
@@ -105,6 +105,7 @@ from manim import (
105
105
  ManimColor,
106
106
  VMobject,
107
107
  )
108
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
108
109
 
109
110
  # ─────────────────────────────────────────────────────────────────────────────
110
111
  # Import sampling_dist components (graceful fallback)
@@ -93,7 +93,7 @@ from manim import (
93
93
  Indicate, Flash,
94
94
  Transform, ReplacementTransform,
95
95
  ValueTracker,
96
- interpolate_color, color_to_rgb,
96
+ interpolate_color as _ic, color_to_rgb,
97
97
  always_redraw,
98
98
  BLACK, WHITE,
99
99
  GREY, GREY_B, GREY_C,
@@ -109,6 +109,7 @@ from manim import (
109
109
  rate_functions,
110
110
  VMobject,
111
111
  )
112
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
112
113
 
113
114
  # ─────────────────────────────────────────────────────────────────────────────
114
115
  # scipy — graceful fallback
@@ -83,7 +83,7 @@ from manim import (
83
83
  Indicate, Flash,
84
84
  Rotate, Transform, ReplacementTransform,
85
85
  ValueTracker,
86
- interpolate_color, color_to_rgb,
86
+ interpolate_color as _ic, color_to_rgb,
87
87
  BLACK, WHITE,
88
88
  GREY, GREY_B, GREY_C,
89
89
  RED, RED_B, RED_C,
@@ -98,6 +98,7 @@ from manim import (
98
98
  rate_functions,
99
99
  VMobject,
100
100
  )
101
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
101
102
 
102
103
  # ─────────────────────────────────────────────────────────────────────────────
103
104
  # Import inference components
@@ -97,11 +97,12 @@ from manim import (
97
97
  FadeIn, FadeOut, GrowFromCenter, GrowFromPoint, Transform,
98
98
  Create, Write, AnimationGroup, Succession, LaggedStart,
99
99
  Rotate, Flash,
100
- interpolate_color, ValueTracker, always_redraw,
100
+ interpolate_color as _ic, ValueTracker, always_redraw,
101
101
  ManimColor,
102
102
  DEGREES,
103
103
  rate_functions,
104
104
  )
105
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
105
106
 
106
107
 
107
108
  # ---------------------------------------------------------------------------
@@ -91,10 +91,11 @@ from manim import (
91
91
  FadeIn, FadeOut, GrowFromCenter, GrowFromPoint, Transform,
92
92
  Create, Write, AnimationGroup, Succession, LaggedStart,
93
93
  Flash,
94
- interpolate_color,
94
+ interpolate_color as _ic,
95
95
  ManimColor,
96
96
  DEGREES,
97
97
  )
98
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
98
99
 
99
100
 
100
101
  # ---------------------------------------------------------------------------
@@ -80,10 +80,11 @@ from manim import (
80
80
  Text, MathTex, DecimalNumber,
81
81
  FadeIn, FadeOut, GrowFromCenter, GrowFromPoint, Transform,
82
82
  Create, Write, AnimationGroup, Succession, LaggedStart,
83
- interpolate_color,
83
+ interpolate_color as _ic,
84
84
  ManimColor,
85
85
  DEGREES,
86
86
  )
87
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
87
88
 
88
89
 
89
90
  # ---------------------------------------------------------------------------
@@ -85,9 +85,10 @@ try:
85
85
  AnimationGroup, Succession, LaggedStart,
86
86
  ChangeDecimalToValue,
87
87
  rate_functions,
88
- interpolate_color,
88
+ interpolate_color as _ic,
89
89
  ValueTracker,
90
90
  )
91
+ interpolate_color = lambda c1, c2, t: _ic(ManimColor(c1), ManimColor(c2), t)
91
92
  _MANIM_AVAILABLE = True
92
93
  except ImportError:
93
94
  _MANIM_AVAILABLE = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: statanim
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: A Manim extension for animated statistical visualisations — distributions, regression, probability, inference and more.
5
5
  Author-email: Rishabh Bhartiya <rishabh.bhartiya.in@gmail.com>
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes
File without changes