from manim import *
import numpy as np
from numpy import array
run_time = 1
def dot(pos, **kwargs):
    return Dot(pos, **kwargs)
data = [
    ["90", "100", "60"],
    ["66", "78", "83"],
]
cols = [Text("小红"), Text("小华"), Text("小明")]
rows = [Text("语文"), Text("数学")]
class T041_07(Scene):
    def construct(self):
        sc = self
        cols = [Text('小红'), Text('小华'), Text('小明')]
        rows = [Text('语文'), Text('数学')]
        t = Table(data, include_outer_lines=True, row_labels=rows, col_labels=cols)
        cell1 = t.get_cell(pos=(2, 2))
        cell2 = t.get_cell(pos=(3, 4))
        cell1.set_color(RED)
        cell2.set_color(BLUE)
        self.play(*[FadeIn(_o) for _o in [cell1, cell2]], run_time=1.0)
        t = Table(data, include_outer_lines=True, row_labels=rows, col_labels=cols)
        self.play(Create(t), run_time=run_time)
        t.add_highlighted_cell(pos=(2, 2), color=GREEN)
        t.add_highlighted_cell(pos=(3, 4), color=YELLOW)
        objs = [t, t]
        g = Group(*objs).arrange(DOWN, buff=0.5)
        if g.width > 12: g.scale(12.0 / g.width)
        self.play(*[FadeIn(_o) for _o in [g]], run_time=1.0)
        self.play(FadeIn(g))
        self.wait(0.5)
        self.wait(1.10)