mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Change some defaults and add Matrix.get_rows method
This commit is contained in:
parent
d3e61b962b
commit
7f47815230
1 changed files with 8 additions and 2 deletions
|
@ -57,8 +57,8 @@ class Matrix(VMobject):
|
|||
CONFIG = {
|
||||
"v_buff": 0.8,
|
||||
"h_buff": 1.3,
|
||||
"bracket_h_buff": MED_SMALL_BUFF,
|
||||
"bracket_v_buff": MED_SMALL_BUFF,
|
||||
"bracket_h_buff": 0.2,
|
||||
"bracket_v_buff": 0.25,
|
||||
"add_background_rectangles_to_entries": False,
|
||||
"include_background_rectangle": False,
|
||||
"element_to_mobject": Tex,
|
||||
|
@ -132,6 +132,12 @@ class Matrix(VMobject):
|
|||
for i in range(len(self.mob_matrix[0]))
|
||||
])
|
||||
|
||||
def get_rows(self):
|
||||
return VGroup(*[
|
||||
VGroup(*row)
|
||||
for row in self.mob_matrix
|
||||
])
|
||||
|
||||
def set_column_colors(self, *colors):
|
||||
columns = self.get_columns()
|
||||
for color, column in zip(colors, columns):
|
||||
|
|
Loading…
Add table
Reference in a new issue