You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
''' - Tree Layout: places vertices into a tree with a root node and branches (can only be used with legal trees) .. manim:: TreeLayout :save_last_frame: class TreeLayout(Scene): def construct(self): graph = Graph( [1, 2, 3, 4, 5, 6, 7], [(1, 2), (1, 3), (2, 4), (2, 5), (3, 6), (3, 7)], layout="tree", layout_config={"root_vertex": 1}, labels=True ) self.add(graph)'''
Doesn't work properly and raise the following exception:
Using directly the root_vertex param instead of using the layout_config param works just fine.
I suggest revisit the examples in the code and check if some of them are deprecated.
@dalopezt Which version of Manim are you using? Make sure it is the same version as the documentation you are reading. Graph layouts were redone in v0.18.1 so if your version of Manim is older you should look at the older documentation.
The code from the example scene works fine in the current version 0.18.1 - this can also be checked with the interactive rendering from within the documentation.
The following comment in the file https://github.com/ManimCommunity/manim/blob/main/manim/mobject/graph.py
Doesn't work properly and raise the following exception:
The text was updated successfully, but these errors were encountered: