Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to_edge doesn't seem to respect my --resolution flags #3604

Closed
anandijain opened this issue Jan 30, 2024 · 2 comments
Closed

to_edge doesn't seem to respect my --resolution flags #3604

anandijain opened this issue Jan 30, 2024 · 2 comments

Comments

@anandijain
Copy link

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
Screenshot 2024-01-30 095222

any help would be appreciated!

@anandijain
Copy link
Author

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.

@uwezi
Copy link
Contributor

uwezi commented Jan 30, 2024

see also my answer to your question in Discord...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants