LogBase
限定名称: manim.mobject.graphing.scale.LogBase
-
类 LogBase(base=10, custom_labels=True)[source]
基类: _ScaleBase
用于对数图/函数的刻度。
- 参数:
-
示例
func = ParametricFunction(lambda x: x, scaling=LogBase(base=2))
方法
函数
|
将值缩放以适应对数刻度。``self.function(5)==10**5`` |
获取自定义标签
|
生成 10^2 形式的自定义 Integer 标签。 |
逆函数
|
function 的逆函数。
|
-
function(value)[source]
将值缩放以适应对数刻度。``self.function(5)==10**5``
- 参数:
value (浮点数)
- 返回类型:
浮点数
-
get_custom_labels(val_range, unit_decimal_places=0, **base_config)[source]
生成 10^2
形式的自定义 Integer
标签。
- 参数:
val_range (可迭代对象[浮点数]) – 用于创建标签的值的可迭代对象。确定指数。
unit_decimal_places (整数) – 指数中包含的小数位数。
base_config (字典[字符串, 任意类型]) – 传递给 Integer
的额外参数。
- 返回类型:
列表[Mobject]
-
inverse_function(value)[source]
function
的逆函数。该值必须大于0
- 参数:
value (浮点数)
- 返回类型:
浮点数