fix NumberLine and GraphScene

This commit is contained in:
Tony031218
2021-02-05 13:57:00 +08:00
parent 820e1840d3
commit 269128dfb6
2 changed files with 3 additions and 3 deletions

View File

@ -99,7 +99,7 @@ class NumberLine(Line):
return result
def get_tick_marks(self):
return self.tick_marks
return self.ticks
def number_to_point(self, number):
alpha = float(number - self.x_min) / (self.x_max - self.x_min)

View File

@ -82,7 +82,7 @@ class GraphScene(Scene):
if len(self.x_labeled_nums) > 0:
if self.exclude_zero_label:
self.x_labeled_nums = [x for x in self.x_labeled_nums if x != 0]
x_axis.add_numbers(*self.x_labeled_nums)
x_axis.add_numbers(self.x_labeled_nums)
if self.x_axis_label:
x_label = TexText(self.x_axis_label)
x_label.next_to(
@ -116,7 +116,7 @@ class GraphScene(Scene):
if len(self.y_labeled_nums) > 0:
if self.exclude_zero_label:
self.y_labeled_nums = [y for y in self.y_labeled_nums if y != 0]
y_axis.add_numbers(*self.y_labeled_nums)
y_axis.add_numbers(self.y_labeled_nums)
if self.y_axis_label:
y_label = TexText(self.y_axis_label)
y_label.next_to(