question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change size and other properties of TextMobjects

See original GitHub issue

Hi,

I have been trying to create to make some changes to the text I write on screen using TextMobjects. Here is a sample line:

final_line = TextMobject(r"${S1 \times R1} \over {S1 + R1}$", color=ORANGE)

The color is the only property I could change for this TextMobject. I tried setting size=0.5. However, it did not have any effect. What about aligning the text?

I looked around for a couple of hours to find examples for positioning the text and found out about Vgroup and arrange.

The arrange method solved the alignment issue. However, I still couldn’t figure out how to change size or other properties.

Is there a central source of information where I can read about properties like arrange and the parameters they take etc. and objects like Vgroup?

Manim does have a lot of classes, methods, and parameters. However, I can only find about them from working examples after a lot of searching.

Is there a place where I can read about the whole library when I want to figure out how to do things?

Thanks. 😃

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
TonyCranecommented, May 6, 2020

The TextMobject is a subclass of SVGMobject, and SVGMobject is a subclass of VMobject, and VMobject is a subclass of Mobject.

So TextMobject has all methods which Mobject, VMobject and SVGMobject have. Then you can find all methods in mobject.py, types/vectorized_mobject.py, svg/svg_mobject.py.

manim has a clear structure of Class inheritance, I made a mind map of the structure, you can see it at here

0reactions
baljeetrathicommented, May 7, 2020

I managed to align the text to left by using \raggedright.

Read more comments on GitHub >

github_iconTop Results From Across the Web

New Text Mobject · Issue #681 · 3b1b/manim - GitHub
My suggestion is using Adobe Illustrator or other software to generate the svg file that contains the proper text and use SVGMobject('filename.
Read more >
Change size and other properties of TextMobjects - Python 博客
Change size and other properties of TextMobjects. Hi,. I have been trying to create to make some changes to the text I write...
Read more >
Creating Text – manim Series: Part 4 - Talking Physics
You are still able change properties of the orignal mobjects after they are groups. In other words, the original mobjects are not destroyed,...
Read more >
How to change text size of TextMobject in Manim
I am wondering how to make text smaller in manim. I know you can do text.scale(0.8) , but I want to know how...
Read more >
Text - Manim Community v0.17.1
Text# ; font_size ; hash_seed. A unique hash representing the result of the generated mobject points. ; height. The height of the mobject....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found