ManimCommunity / ManimCommunity/manim
`unit_size` does not work in Axes
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
## Description of bug / unexpected behavior
The **Axes** class does not respect the `"unit_size"` setting with the `x_axis_config` or `y_axis_config` parameter.
## Expected behavior
If you change **Axes** to **NumberPlane** then it solves:
```python
class Test1(Scene):
def construct(self):
axes = NumberPlane(
x_range=[-3,3,1],
y_range=[-6,6,2],
x_axis_config={
"unit_size": 1
},
y_axis_config={
"unit_size": 0.5
}
)
self.add(axes)
```

## How to reproduce the issue
```python
class AxesBug(Scene):
def construct(self):
axes = Axes(
x_range=[-3,3,1],
y_range=[-6,6,2],
x_axis_config={
"unit_size": 1
},
y_axis_config={
"unit_size": 0.5
}
)
self.add(axes)
```

## My specs.
Manim 0.12, tested on MacOS M1 Big Sur and Linux Mint 20.1
Contributor guide
Research direction
Start with the Axes and NumberPlane entry points and reproduce the example using x_axis_config and y_axis_config with unit_size. Compare how the two classes handle these settings, then verify that Axes respects the requested x- and y-axis unit sizes in the same example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100