LogBase#
Qualified name: manim.mobject.graphing.scale.LogBase
- class LogBase(base=10, custom_labels=True)[source]#
Bases:
_ScaleBaseScale for logarithmic graphs/functions.
- Parameters
base (float) – The base of the log, by default 10.
custom_labels (bool) – For use with
Axes: Whether or not to includeLaTeXaxis labels, by default True.
Examples
func = ParametricFunction(lambda x: x, scaling=LogBase(base=2))
Methods
Scales the value to fit it to a logarithmic scale.``self.function(5)==10**5``
Produces custom
Integerlabels in the form of10^2.Inverse of
function.- function(value)[source]#
Scales the value to fit it to a logarithmic scale.``self.function(5)==10**5``
- Parameters
value (float) –
- Return type
float
- get_custom_labels(val_range, unit_decimal_places=0, **base_config)[source]#
Produces custom
Integerlabels in the form of10^2.- Parameters
val_range (Iterable[float]) – The iterable of values used to create the labels. Determines the exponent.
unit_decimal_places (int) – The number of decimal places to include in the exponent
base_config (dict[str, Any]) – Additional arguments to be passed to
Integer.
- Return type
list[Mobject]