manim icon indicating copy to clipboard operation
manim copied to clipboard

Changing values in a table

Open justanothernoob4648 opened this issue 3 years ago • 4 comments

Description of proposed feature

Be able to change individual cell values in a Table object.

How can the new feature be used?

For example, if a table origianally has a list of numbers from 1 to 10. Use this to change the numbers 1,3,5,7,9 to A,B,C,D,E or something like that (and animate the changes).

Additional comments

justanothernoob4648 avatar Aug 13 '22 18:08 justanothernoob4648

@justanothernoob4648 can u please give more description about the issue, because I would like to work upon this issue

parth-verma7 avatar Sep 30 '22 19:09 parth-verma7

Currently there is no way to edit a table once it has already been created. The only workaround so far has been to create a new table and remove the old one in order to change numbers in the table. I propose some function that can pick a cell or cells and change them all at once without making a new table (and be able to animate this).

justanothernoob4648 avatar Sep 30 '22 21:09 justanothernoob4648

Hello. I am learning manim, so my information could be innacurate. But I am trying to use tables, and I feel like I'm missing functionality, or I am using them wrong.

I wanted to do an animation creating a table value by value. I tried to make an empty table, just specifying column labels and row labels. And using "", an empty string, in every cell. It seems like I can't even create a new value and move it to one specific position, since table.get_entries((x,y)) returns an empty object with center 0,0,0 if the content is empty.

Fairlight8 avatar Dec 19 '22 00:12 Fairlight8

Here's the code that I'm using to do this:

self.play(manim.ReplacementTransform(table.mob_table[y][x], newCellMobject))
table.mob_table[y][x] = newCellMobject

The only problem that I can see with this aproach is that it does not update the height of the rows or the width of the columns.

godalming123 avatar Jun 08 '25 12:06 godalming123