%%manim -qm AnimateBarChart
class AnimateBarChart(Scene):
def construct(self):
# Initial values for the bar chart
initial_values = [5, 10, 15, 20, 25]
# Create the BarChart Mobject
chart = BarChart(
values=initial_values,
bar_names=["600313", "600323", "600413", "600315", "600213"],
y_range=[-10, 90, 5], # Y-axis range from 0 to 30 with ticks every 5
y_length=6,
x_length=10,
x_axis_config={"font_size": 36},
bar_colors=[BLUE, GREEN, YELLOW, ORANGE, RED]
)
# Create and add bar labels
bar_labels = chart.get_bar_labels(font_size=48)
# Display the initial bar chart and labels
self.play(Create(chart), Create(bar_labels))
self.wait(1)
# New values to animate to
final_values = [20, 5, 25, 10, 15]
# Animate the change in bar values
# The .animate property allows animating the method call
self.play(chart.animate.change_bar_values(final_values),
bar_labels.animate.become(chart.get_bar_labels(final_values, font_size=48)),
run_time=2)
self.wait(1)
# Another animation with different values and a different run_time
another_values = [10, 20, 5, 15, 25]
self.play(chart.animate.change_bar_values(another_values),
bar_labels.animate.become(chart.get_bar_labels(another_values, font_size=48)),
run_time=1.5,
rate_func=linear) # Use a linear rate function for a constant speed animation
self.wait(2)
https://jishuzhan.net/article/1968641007073411073
可以闪烁的轨迹
https://www.desmos.com/api/v1.11/docs/index.html?lang=zh-CN#document-coordinates
https://gou8.net/aliplay.html?url=/m3u8/105/271638.m3u8
registry.gesis.mybinder.org/i-knight2010-2dmanim-2dtour-0a6727:cea55e38b4b805c7d3c10b0dd4c016dfe2b2ea24
https://qwen-qwen3-tts-demo.hf.space/
https://mybinder.readthedocs.io/en/latest/tutorials/dockerfile.html
kaggle.com
https://www.mixamo.com/
https://polyhaven.com/