Skip to content

Commit 510a7da

Browse files
committed
Formatting comments and indentations of README.md
* README.md: Add one space after each `#`
2 parents adc1ac9 + d28bff1 commit 510a7da

File tree

1 file changed

+45
-45
lines changed

1 file changed

+45
-45
lines changed

README.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,13 @@ from manimlib.imports import *
123123

124124
class Shapes(Scene):
125125
def construct(self):
126-
######Code######
127-
#Making shapes
126+
###### Code ######
127+
# Making shapes
128128
circle = Circle()
129129
square = Square()
130130
triangle=Polygon(np.array([0,0,0]),np.array([1,1,0]),np.array([1,-1,0]))
131131

132-
#Showing shapes
132+
# Showing shapes
133133
self.play(ShowCreation(circle))
134134
self.play(FadeOut(circle))
135135
self.play(GrowFromCenter(square))
@@ -160,8 +160,8 @@ from math import cos, sin, pi
160160

161161
class Shapes(Scene):
162162
def construct(self):
163-
#######Code#######
164-
#Making Shapes
163+
####### Code #######
164+
# Making Shapes
165165
circle = Circle(color=YELLOW)
166166
square = Square(color=DARK_BLUE)
167167
square.surround(circle)
@@ -176,7 +176,7 @@ class Shapes(Scene):
176176
for i in range(8):
177177
pointers.append(Line(ORIGIN, np.array([cos(pi/180*360/8*i),sin(pi/180*360/8*i), 0]),color=YELLOW))
178178

179-
#Showing animation
179+
# Showing animation
180180
self.add(circle)
181181
self.play(FadeIn(square))
182182
self.play(Transform(square, rectangle))
@@ -243,20 +243,20 @@ from manimlib.imports import *
243243

244244
class makeText(Scene):
245245
def construct(self):
246-
#######Code#######
247-
#Making text
246+
####### Code #######
247+
# Making text
248248
first_line = TextMobject("Manim is fun")
249249
second_line = TextMobject("and useful")
250250
final_line = TextMobject("Hope you like it too!", color=BLUE)
251251
color_final_line = TextMobject("Hope you like it too!")
252252

253-
#Coloring
253+
# Coloring
254254
color_final_line.set_color_by_gradient(BLUE,PURPLE)
255255

256-
#Position text
256+
# Position text
257257
second_line.next_to(first_line, DOWN)
258258

259-
#Showing text
259+
# Showing text
260260
self.wait(1)
261261
self.play(Write(first_line), Write(second_line))
262262
self.wait(1)
@@ -284,7 +284,7 @@ from manimlib.imports import *
284284

285285
class Equations(Scene):
286286
def construct(self):
287-
#Making equations
287+
# Making equations
288288
first_eq = TextMobject("$$J(\\theta) = -\\frac{1}{m} [\\sum_{i=1}^{m} y^{(i)} \\log{h_{\\theta}(x^{(i)})} + (1-y^{(i)}) \\log{(1-h_{\\theta}(x^{(i)}))}] $$")
289289
second_eq = ["$J(\\theta_{0}, \\theta_{1})$", "=", "$\\frac{1}{2m}$", "$\\sum\\limits_{i=1}^m$", "(", "$h_{\\theta}(x^{(i)})$", "-", "$y^{(i)}$", "$)^2$"]
290290

@@ -300,14 +300,14 @@ class Equations(Scene):
300300
des2 = TextMobject("Or this...")
301301
des3 = TextMobject("And it looks nice!!")
302302

303-
#Coloring equations
303+
# Coloring equations
304304
second_mob.set_color_by_gradient("#33ccff","#ff00ff")
305305

306306
#Positioning equations
307307
des1.shift(2*UP)
308308
des2.shift(2*UP)
309309

310-
#Animating equations
310+
# Animating equations
311311
self.play(Write(des1))
312312
self.play(Write(first_eq))
313313
self.play(ReplacementTransform(des1, des2), Transform(first_eq, eq2))
@@ -413,7 +413,7 @@ class Graphing(GraphScene):
413413

414414
point = Dot(self.coords_to_point(1,self.func_to_graph(1)))
415415

416-
#Display graph
416+
# Display graph
417417
self.play(ShowCreation(func_graph), Write(graph_lab))
418418
self.wait(1)
419419
self.play(ShowCreation(vert_line))
@@ -432,37 +432,37 @@ class Graphing(GraphScene):
432432
```
433433

434434

435-
Here is the default dictionary Manim uses for graphing.
436-
```python
435+
Here is the default dictionary Manim uses for graphing. Refer to [`manimlib/scene/graph_scene.py`][graph_scene_src]
437436

437+
[graph_scene_src]: https://github.com/3b1b/manim/blob/master/manimlib/scene/graph_scene.py`
438+
```python
438439
CONFIG = {
439-
"x_min": -1,
440-
"x_max": 10,
441-
"x_axis_width": 9,
442-
"x_tick_frequency": 1,
443-
"x_leftmost_tick": None, # Change if different from x_min
444-
"x_labeled_nums": None,
445-
"x_axis_label": "$x$",
446-
"y_min": -1,
447-
"y_max": 10,
448-
"y_axis_height": 6,
449-
"y_tick_frequency": 1,
450-
"y_bottom_tick": None, # Change if different from y_min
451-
"y_labeled_nums": None,
452-
"y_axis_label": "$y$",
453-
"axes_color": GREY,
454-
"graph_origin": 2.5 * DOWN + 4 * LEFT,
455-
"exclude_zero_label": True,
456-
"num_graph_anchor_points": 25,
457-
"default_graph_colors": [BLUE, GREEN, YELLOW],
458-
"default_derivative_color": GREEN,
459-
"default_input_color": YELLOW,
460-
"default_riemann_start_color": BLUE,
461-
"default_riemann_end_color": GREEN,
462-
"area_opacity": 0.8,
463-
"num_rects": 50,
440+
"x_min": -1,
441+
"x_max": 10,
442+
"x_axis_width": 9,
443+
"x_tick_frequency": 1,
444+
"x_leftmost_tick": None, # Change if different from x_min
445+
"x_labeled_nums": None,
446+
"x_axis_label": "$x$",
447+
"y_min": -1,
448+
"y_max": 10,
449+
"y_axis_height": 6,
450+
"y_tick_frequency": 1,
451+
"y_bottom_tick": None, # Change if different from y_min
452+
"y_labeled_nums": None,
453+
"y_axis_label": "$y$",
454+
"axes_color": GREY,
455+
"graph_origin": 2.5 * DOWN + 4 * LEFT,
456+
"exclude_zero_label": True,
457+
"num_graph_anchor_points": 25,
458+
"default_graph_colors": [BLUE, GREEN, YELLOW],
459+
"default_derivative_color": GREEN,
460+
"default_input_color": YELLOW,
461+
"default_riemann_start_color": BLUE,
462+
"default_riemann_end_color": GREEN,
463+
"area_opacity": 0.8,
464+
"num_rects": 50,
464465
}
465-
466466
```
467467

468468

@@ -529,8 +529,8 @@ from manimlib.imports import *
529529
class Images(Scene):
530530
def construct(self):
531531
img = ImageMobject('pathToIm.png')
532-
img.scale(2) # Resize to be twice as big
533-
img.shift(2 * UP) # Move the image
532+
img.scale(2) # Resize to be twice as big
533+
img.shift(2 * UP) # Move the image
534534

535535
self.play(ShowCreation(img)) # Display the image
536536
```

0 commit comments

Comments
 (0)