mirror of
https://github.com/3b1b/manim.git
synced 2025-07-28 20:43:56 +08:00
Merge pull request #469 from ggarza/master
Fix alignment of minus sign to numbers
This commit is contained in:
@ -62,7 +62,8 @@ class DecimalNumber(VMobject):
|
||||
# to the bottom
|
||||
for i, c in enumerate(num_string):
|
||||
if c == "-" and len(num_string) > i + 1:
|
||||
self[i].align_to(self[i + 1], alignment_vect=UP)
|
||||
self[i].align_to(self[i + 1], UP)
|
||||
self[i].shift(self[i+1].get_height() * DOWN / 2)
|
||||
elif c == ",":
|
||||
self[i].shift(self[i].get_height() * DOWN / 2)
|
||||
if self.unit and self.unit.startswith("^"):
|
||||
|
@ -109,6 +109,7 @@ class GraphScene(Scene):
|
||||
numbers_with_elongated_ticks=self.y_labeled_nums,
|
||||
color=self.axes_color,
|
||||
line_to_number_vect=LEFT,
|
||||
label_direction=LEFT,
|
||||
)
|
||||
y_axis.shift(self.graph_origin - y_axis.number_to_point(0))
|
||||
y_axis.rotate(np.pi / 2, about_point=y_axis.number_to_point(0))
|
||||
|
Reference in New Issue
Block a user