Skip to content

Axes coords_to_point should accept sequences  #1666

@k4pran

Description

@k4pran

Description of bug / unexpected behavior

The Axes class method coords_to_point states that it accepts a sequence when it doesn't, it only accepts a variable number of floats. This meants that you cannot do things like:

axes.coords_to_point(RIGHT)

and instead need to do unpack the sequence:

axes.coords_to_point(*RIGHT)

Expected behavior

I think it would be more consistent for it to accept sequences as this is more compatible with the rest of manim, and there is only ever going to be a max of 3 input values.

How to reproduce the issue

Code for reproducing the problem
class Example(Scene):

    def construct(self):
        axes = Axes(axis_config={'include_numbers': True})
        f_vec = Vector(axes.coords_to_point(*RIGHT))
        f_vec.set_stroke(width=2.0)
        self.add(axes, f_vec)

Additional media files

Images/GIFs

Logs

Terminal output
PASTE HERE OR PROVIDE LINK TO https://pastebin.com/ OR SIMILAR

System specifications

System Details
  • OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)):
  • RAM:
  • Python version (python/py/python3 --version):
  • Installed modules (provide output from pip list):
PASTE HERE
LaTeX details
  • LaTeX distribution (e.g. TeX Live 2020):
  • Installed LaTeX packages:
FFMPEG

Output of ffmpeg -version:

PASTE HERE

Additional comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue:bugSomething isn't working... For use in issues

    Type

    No type

    Projects

    Status

    ❌ Rejected

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions