Skip to content

Conversation

abdallahsoliman00
Copy link
Contributor

Motivation

The numbers on the y-axis of Axes are horizontal:
image

There is no feature to make them vertical.

Proposed changes

To make them vertical, the NumberLine class (the mobject used to create the axes) was edited where a new argument number_orientation was introduced the the __init__.

The variable number_orientation takes in the rotation in radians.

The y_axis_config argument within Axes can now include the number orientation value.

Test

Code:

class Test(Scene):
        ax = Axes(
            x_range=(0,x_max,1),
            y_range=(0,x_max+1,1),
            height=6,
            width=6,
            x_axis_config={'include_numbers': True},
            y_axis_config={
                'include_numbers': True,
                'line_to_number_direction': UP,
                'number_orientation' : -PI/2
            }
        )
        self.add(ax)

Result:
image

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

Successfully merging this pull request may close these issues.

1 participant