Axes - How to hide y-axis? #3580
Unanswered
wangjia184
asked this question in
Q&A
Replies: 1 comment
-
choosing the background color of your scene should work, but why do you want to hide the Y-axis? Would a numberline be more suited for your needs? Discord: where can I find more resources for learning manim? class hide_y(Scene):
def construct(self):
ax = Axes(
x_range=[-1, 1],
y_range=[0, 20],
x_length=3,
y_length=2,
axis_config={"include_tip": True,
"tip_width":0.1,
"tip_height":0.1,
"color" : WHITE,
"include_ticks":False,
"unit_size":0.1,
"tick_size":0.05,
"font_size":18,
"include_numbers":False,
"numbers_to_include" :[], #[0, 0.5, 1.0],
"line_to_number_buff":0.1,
"longer_tick_multiple":0.5,
"decimal_number_config" : { "num_decimal_places": 1}},
x_axis_config = { "exclude_origin_tick": False },
y_axis_config = { "include_tip": False, "color" : BLACK },
z_index=2
)
self.add(ax) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Please how can I hide the y-axis in Axes? I tried
{color : None}
, it does not workBeta Was this translation helpful? Give feedback.
All reactions