Skip to content

Commit

Permalink
Merge pull request 3b1b#871 from 3b1b/bayes
Browse files Browse the repository at this point in the history
Bayes
  • Loading branch information
3b1b authored Feb 3, 2020
2 parents 839fb4f + 77acc99 commit 3072887
Show file tree
Hide file tree
Showing 21 changed files with 38 additions and 148 deletions.
2 changes: 1 addition & 1 deletion from_3b1b/active/bayes/part1.py
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,7 @@ def construct(self):
"unit_size": 0.07,
"tick_frequency": 10,
},
number_line_config={
axis_config={
"include_tip": False,
},
)
Expand Down
12 changes: 6 additions & 6 deletions from_3b1b/active/diffyq/part1/pendulum.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class ThetaVsTAxes(Axes):
"tick_frequency": PI / 8,
"unit_size": 1.5,
},
"number_line_config": {
"axis_config": {
"color": "#EEEEEE",
"stroke_width": 2,
"include_tip": False,
Expand Down Expand Up @@ -371,7 +371,7 @@ class IntroducePendulum(PiCreatureScene, MovingCameraScene):
"tip_length": 0.3,
},
"x_max": 12,
"number_line_config": {
"axis_config": {
"stroke_width": 2,
}
},
Expand Down Expand Up @@ -750,7 +750,7 @@ class LowAnglePendulum(Scene):
"number_scale_val": 0.5,
},
"x_max": 25,
"number_line_config": {
"axis_config": {
"tip_length": 0.3,
"stroke_width": 2,
}
Expand Down Expand Up @@ -837,7 +837,7 @@ class MediumAnglePendulum(LowAnglePendulum):
"y_axis_config": {"unit_size": 0.75},
"y_max": PI / 2,
"y_min": -PI / 2,
"number_line_config": {
"axis_config": {
"tip_length": 0.3,
"stroke_width": 2,
}
Expand Down Expand Up @@ -867,7 +867,7 @@ class HighAnglePendulum(LowAnglePendulum):
"y_axis_config": {"unit_size": 0.5},
"y_max": PI,
"y_min": -PI,
"number_line_config": {
"axis_config": {
"tip_length": 0.3,
"stroke_width": 2,
}
Expand All @@ -888,7 +888,7 @@ class VeryLowAnglePendulum(LowAnglePendulum):
"y_axis_config": {"unit_size": 2},
"y_max": PI / 4,
"y_min": -PI / 4,
"number_line_config": {
"axis_config": {
"tip_length": 0.3,
"stroke_width": 2,
}
Expand Down
6 changes: 3 additions & 3 deletions from_3b1b/active/diffyq/part2/fourier_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,18 +372,18 @@ def get_path(self):
return path


class FourierOfName(FourierOfPiSymbol, MovingCameraScene):
class FourierOfTexPaths(FourierOfPiSymbol, MovingCameraScene):
CONFIG = {
"n_vectors": 100,
"name_color": WHITE,
"name_text": "Abc",
"animated_name": "Abc",
"time_per_symbol": 5,
"slow_factor": 1 / 5,
"parametric_function_step_size": 0.01,
}

def construct(self):
name = TextMobject(self.name_text)
name = TextMobject(self.animated_name)
max_width = FRAME_WIDTH - 2
max_height = FRAME_HEIGHT - 2
name.set_width(max_width)
Expand Down
2 changes: 1 addition & 1 deletion from_3b1b/active/diffyq/part2/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def add_graph(self):
x_max=20,
y_min=0,
y_max=10,
number_line_config={
axis_config={
"unit_size": 0.5,
},
)
Expand Down
2 changes: 1 addition & 1 deletion from_3b1b/active/diffyq/part3/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class FourierSeriesIllustraiton(Scene):
CONFIG = {
"n_range": range(1, 31, 2),
"axes_config": {
"number_line_config": {
"axis_config": {
"include_tip": False,
},
"x_axis_config": {
Expand Down
2 changes: 1 addition & 1 deletion from_3b1b/old/borsuk_addition.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ def setup(self):
x_max=2.5,
y_min=-2.5,
y_max=2.5,
number_line_config={'unit_size': 1.5}
axis_config={'unit_size': 1.5}
)
for axis in axes:
numbers = list(range(-2, 3))
Expand Down
2 changes: 1 addition & 1 deletion from_3b1b/old/clacks/question.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ def setup_axes(self):
y_min=0,
x_max=9,
y_max=5,
number_line_config={
axis_config={
"tick_frequency": 100,
"numbers_with_elongated_ticks": [],
}
Expand Down
4 changes: 2 additions & 2 deletions from_3b1b/old/clacks/solution1.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ class IntroduceVelocityPhaseSpace(AskAboutFindingNewVelocities):
"x_min": -3.5,
"x_max": 4,
},
"number_line_config": {
"axis_config": {
"unit_size": 0.7,
},
},
Expand Down Expand Up @@ -2612,7 +2612,7 @@ def construct(self):
def draw_unit_circle(self):
unit_size = 2.5
axes = Axes(
number_line_config={"unit_size": unit_size},
axis_config={"unit_size": unit_size},
x_min=-2.5, x_max=2.5,
y_min=-1.5, y_max=1.5,
)
Expand Down
2 changes: 1 addition & 1 deletion from_3b1b/old/div_curl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2925,7 +2925,7 @@ def add_axes(self):
y_min=0,
y_max=55,
y_axis_config={"unit_size": 0.09},
number_line_config={
axis_config={
"tick_frequency": 10,
},
)
Expand Down
6 changes: 3 additions & 3 deletions from_3b1b/old/fourier.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def measure_air_pressure(self):
axes = Axes(
y_min = -2, y_max = 2,
x_min = 0, x_max = 10,
number_line_config = {"include_tip" : False},
axis_config = {"include_tip" : False},
)
axes.stretch_to_fit_height(2)
axes.to_corner(UP+LEFT)
Expand Down Expand Up @@ -807,7 +807,7 @@ class FourierMachineScene(Scene):
"y_unit_size" : 1,
},
"frequency_axes_config" : {
"number_line_config" : {
"axis_config" : {
"color" : TEAL,
},
"x_min" : 0,
Expand Down Expand Up @@ -3906,7 +3906,7 @@ def add_graph(self):
x_max = 140,
y_min = -2,
y_max = 2,
number_line_config = {
axis_config = {
"include_tip" : False,
},
)
Expand Down
4 changes: 2 additions & 2 deletions from_3b1b/old/hyperdarts.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ def construct(self):
x_max=1.25,
y_min=-1.25,
y_max=1.25,
number_line_config={
axis_config={
"tick_frequency": 0.25,
"unit_size": unit_size,
},
Expand Down Expand Up @@ -1527,7 +1527,7 @@ def construct(self):
x_max=1.25,
y_min=-1.25,
y_max=1.25,
number_line_config={
axis_config={
"unit_size": unit_size,
"tick_frequency": 0.5,
"include_tip": False,
Expand Down
110 changes: 0 additions & 110 deletions from_3b1b/old/name_animation.py

This file was deleted.

4 changes: 2 additions & 2 deletions from_3b1b/old/quaternions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3812,7 +3812,7 @@ def construct(self):

def add_axes(self):
axes = Axes(
number_line_config={
axis_config={
"unit_size": 2,
"color": WHITE,
}
Expand Down Expand Up @@ -4336,7 +4336,7 @@ def get_simple_axes(self, label, color):
class SimpleImaginaryQuaternionAxes(SpecialThreeDScene):
def construct(self):
self.three_d_axes_config.update({
"number_line_config": {"unit_size": 2},
"axis_config": {"unit_size": 2},
"x_min": -2,
"x_max": 2,
"y_min": -2,
Expand Down
2 changes: 1 addition & 1 deletion from_3b1b/old/sphere_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,7 @@ def construct(self):

def recreate_cross_section(self):
axes = Axes(
number_line_config={
axis_config={
"unit_size": 2,
}
)
Expand Down
4 changes: 2 additions & 2 deletions from_3b1b/old/spirals.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def read_in_primes(max_N=None):
class SpiralScene(MovingCameraScene):
CONFIG = {
"axes_config": {
"number_line_config": {
"axis_config": {
"stroke_width": 1.5,
}
},
Expand Down Expand Up @@ -2897,7 +2897,7 @@ class ExplainRays(Explain44Spirals):
"x_max": 1000,
"y_min": -1000,
"y_max": 1000,
"number_line_config": {
"axis_config": {
"tick_frequency": 50,
},
},
Expand Down
2 changes: 1 addition & 1 deletion from_3b1b/on_hold/moduli.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def get_length_labels():
x_max=1.5,
y_min=-0.25,
y_max=1.5,
number_line_config={
axis_config={
"tick_frequency": 0.25,
"unit_size": 3,
}
Expand Down
8 changes: 3 additions & 5 deletions manimlib/mobject/coordinate_systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def input_to_graph_point(self, x, graph):

class Axes(VGroup, CoordinateSystem):
CONFIG = {
"number_line_config": {
"axis_config": {
"color": LIGHT_GREY,
"include_tip": True,
"exclude_zero_from_default_numbers": True,
Expand Down Expand Up @@ -158,7 +158,7 @@ def __init__(self, **kwargs):

def create_axis(self, min_val, max_val, axis_config):
new_config = merge_dicts_recursively(
self.number_line_config,
self.axis_config,
{"x_min": min_val, "x_max": max_val},
axis_config,
)
Expand Down Expand Up @@ -284,9 +284,7 @@ class NumberPlane(Axes):
}

def __init__(self, **kwargs):
digest_config(self, kwargs)
kwargs["number_line_config"] = self.axis_config
Axes.__init__(self, **kwargs)
super.__init__(**kwargs)
self.init_background_lines()

def init_background_lines(self):
Expand Down
Loading

0 comments on commit 3072887

Please sign in to comment.