Open Ironman1905 opened 7 months ago
This is an issue with how coloring of Axes
is handled during initialization of the object. The best solution (for now) is to take care of coloring in a second step, after creating the object:
from manim import *
config.background_color = WHITE
class Test(Scene):
def construct(self):
axes = Axes(x_range=[-1, 8], y_range=[-1, 70],
x_axis_config={
"include_numbers": True,
"decimal_number_config": {"num_decimal_places": 0}
},
y_axis_config={"include_ticks": False}
)
axes.set_color(BLACK)
self.add(axes)
redcolor = ManimColor.from_rgb([255,0,0])
bluecolor = ManimColor.from_rgb([0,0,255])
Parabola_graph = axes.plot(lambda x: x**3, color=bluecolor)
line_graph = axes.plot(lambda x: 15*x+4, color=redcolor)
self.play(Create(Parabola_graph), Create(line_graph), run_time=5)
+1
When animating the axis with e.g. self.play(Write(axes))
, the numbers briefly show up
Is this issue resolved? I tried the same code as
Code for reproducing the problem
from manim import * #from scipy.stats import norm #import os config.media_width="10%" config.background_color="WHITE" class Test(Scene): def construct(self): axes = Axes( x_range=[-1,8],y_range=[-1,70], #axis_config={"color": BLACK}, x_axis_config={"color": BLACK, "include_numbers": True, "decimal_number_config": { "color": BLACK, "num_decimal_places": 0 } }, y_axis_config={"color": BLACK, "include_ticks": False} ) self.add(axes) redcolor=ManimColor.from_rgb([255,0,0]) bluecolor=ManimColor.from_rgb([0,0,255]) Parabola_graph=axes.plot(lambda x: x**3, color=bluecolor) line_graph=axes.plot(lambda x: 15*x+4, color=redcolor) self.play(Create(Parabola_graph), Create(line_graph),run_time=5)
And got this output
Description of bug / unexpected behavior
I set the background is white, but the numbers with Black color nearby the axis don't display
Expected behavior
I should see the black number label when background is white
How to reproduce the issue
Code for reproducing the problem
```py from manim import * #from scipy.stats import norm #import os config.media_width="10%" config.background_color="WHITE" class Test(Scene): def construct(self): axes = Axes( x_range=[-1,8],y_range=[-1,70], #axis_config={"color": BLACK}, x_axis_config={"color": BLACK, "include_numbers": True, "decimal_number_config": { "color": BLACK, "num_decimal_places": 0 } }, y_axis_config={"color": BLACK, "include_ticks": False} ) self.add(axes) redcolor=ManimColor.from_rgb([255,0,0]) bluecolor=ManimColor.from_rgb([0,0,255]) Parabola_graph=axes.plot(lambda x: x**3, color=bluecolor) line_graph=axes.plot(lambda x: 15*x+4, color=redcolor) self.play(Create(Parabola_graph), Create(line_graph),run_time=5) ```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