manim
manim copied to clipboard
`to_edge` doesn't seem to respect my `--resolution` flags
I'm just learning manim (0.18, windows, python 3.11.7) but having some trouble with vertical aspect ratios (w1080xh1920). it doesn't seem like to_edge
is respecting my --resolution
flags. its possible i am misunderstanding the docs and what to_edge does
from manim import *
class TopTextExample(Scene):
def construct(self):
my_text = Text("Hello, Manim!")
my_text.to_edge(UP)
self.add(my_text)
self.wait(2)
manim -ql .\test.py
gives me text that is actually at the top of the rendered (horizontal) video
but manim -ql --resolution 1080,1920 .\test.py
gives the attached image where the text is considerably lower than the top edge
any help would be appreciated!
printing out config
for manim --resolution 1080,1920 .\test.py
, i'm seeing:
pixel_height: 1920, pixel_width: 1080
and
frame_height: 8.0, frame_rate: 60.0, frame_width: 14.222222222222221
i was able to get everything working by manually swapping the values for frame_height and frame_width in the config.
see also my answer to your question in Discord...