Merge pull request #1355 from TonyCrane/fix-numberline

Fix GraphScene and NumberLine
This commit is contained in:
Grant Sanderson 2021-02-05 14:51:47 -08:00 committed by GitHub
commit 7a44d66ebc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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(