mirror of
https://github.com/3b1b/manim.git
synced 2026-04-26 03:00:23 -04:00
cleanup
This commit is contained in:
@@ -285,58 +285,3 @@ class FlashThroughHistogram(Animation):
|
||||
|
||||
|
||||
|
||||
|
||||
class SampleScene(Scene):
|
||||
|
||||
def construct(self):
|
||||
|
||||
x_values = np.array([1,2,3,4,5])
|
||||
y_values = np.array([4,3,5,2,3])
|
||||
|
||||
hist1 = Histogram(
|
||||
x_values = x_values,
|
||||
y_values = y_values,
|
||||
x_scale = 0.5,
|
||||
y_scale = 0.5,
|
||||
).shift(1*DOWN)
|
||||
self.add(hist1)
|
||||
self.wait()
|
||||
|
||||
y_values2 = np.array([3,8,7,15,5])
|
||||
|
||||
hist2 = Histogram(
|
||||
x_values = x_values,
|
||||
y_values = y_values2,
|
||||
x_scale = 0.5,
|
||||
y_scale = 0.5,
|
||||
x_labels = text_range(1,6,1),
|
||||
)
|
||||
|
||||
v1 = hist1.get_lower_left_point()
|
||||
v2 = hist2.get_lower_left_point()
|
||||
hist2.shift(v1 - v2)
|
||||
|
||||
# self.play(
|
||||
# ReplacementTransform(hist1,hist2)
|
||||
# )
|
||||
|
||||
self.play(
|
||||
FlashThroughHistogram(
|
||||
hist1,
|
||||
direction = "horizontal",
|
||||
mode = "linear",
|
||||
run_time = 10,
|
||||
rate_func = None,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user