ManimCommunity / ManimCommunity/manim

Failing NumberPlane Constructor options, i.e. x_range and y_range

Open
#1,942 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue:bug
Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

## Description of bug / unexpected behavior

When I use the NumberPlace constructor with the x_range and y_range options, those options do not change the NumberPlane dimensions. The default constructor values remain.

## Expected behavior

I expected the x_range and y_range to edit the number plane object and the tic placements.

## How to reproduce the issue

Code for reproducing the problem

```py
from manim import *

class GraphSceneExample(Scene):
def construct(self):

#Create number plane
number_plane = NumberPlane(
x_range=[-10, 10, 1],
y_range=[-10, 10, 1],
background_line_style={
"stroke_color": TEAL,
"stroke_width": 4,
"stroke_opacity": 0.6
}
)
self.add(number_plane)

dot = Dot([7,4,0])
self.add(dot)
```

## Additional media files

![GraphSceneExample_ManimCE_v0 9 0](https://user-images.githubusercontent.com/5116730/130310411-dbc126fa-2d5e-4ca1-895d-8d0755f02eb6.png)

Images/GIFs

## Logs
Terminal output

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

## System specifications

System Details

- OS (macOS 10.15.7 (Catalina)):
- RAM 16GB:
- Python version (3.7.3):
- Installed modules (provide output from `pip list`):
```
certifi 2021.5.30
charset-normalizer 2.0.4
click 8.0.1
click-default-group 1.2.2
cloup 0.7.1
colorama 0.4.4
colour 0.1.5
commonmark 0.9.1
Cython 0.29.24
decorator 5.0.9
glcontext 2.3.4
idna 3.2
importlib-metadata 4.6.3
manim 0.9.0
ManimPango 0.3.0
mapbox-earcut 0.12.10
moderngl 5.6.4
moderngl-window 2.4.0
multipledispatch 0.6.0
networkx 2.6.2
numpy 1.21.1
Pillow 8.3.1
pip 21.2.3
pycairo 1.20.1
pydub 0.25.1
pyglet 1.5.18
Pygments 2.9.0
pyobjc-core 7.3
pyobjc-framework-Cocoa 7.3
pyrr 0.10.3
requests 2.26.0
rich 10.7.0
scipy 1.7.1
screeninfo 0.6.7
setuptools 57.4.0
six 1.16.0
tqdm 4.62.0
typing-extensions 3.10.0.0
urllib3 1.26.6
watchdog 2.1.3
wheel 0.37.0
zipp 3.5.0
```

LaTeX details

+ LaTeX distribution (e.g. TeX Live 2019):
+ Installed LaTeX packages:
too much...

FFMPEG

Output of `ffmpeg -version`:

```
fmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
built with Apple clang version 12.0.0 (clang-1200.0.32.29)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4_2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-avresample --enable-videotoolbox
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
```

## Additional comments

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the NumberPlane constructor and reproduce the issue using the provided GraphSceneExample code with explicit x_range and y_range values. Trace how those options affect the plane dimensions and tick placements, then verify that the rendered plane reflects the requested ranges rather than the defaults.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.