mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
Merge 1b7963bf2a into 0e83f4b09a
This commit is contained in:
commit
5bafcb3a62
2 changed files with 17 additions and 5 deletions
|
|
@ -1932,8 +1932,8 @@ class Axes(VGroup, CoordinateSystem, metaclass=ConvertToOpenGL):
|
|||
self,
|
||||
x_range: Sequence[float] | None = None,
|
||||
y_range: Sequence[float] | None = None,
|
||||
x_length: float | None = round(config.frame_width) - 2,
|
||||
y_length: float | None = round(config.frame_height) - 2,
|
||||
x_length: float | None = None,
|
||||
y_length: float | None = None,
|
||||
axis_config: dict | None = None,
|
||||
x_axis_config: dict | None = None,
|
||||
y_axis_config: dict | None = None,
|
||||
|
|
@ -1989,6 +1989,16 @@ class Axes(VGroup, CoordinateSystem, metaclass=ConvertToOpenGL):
|
|||
else:
|
||||
self.y_axis_config["exclude_origin_tick"] = False
|
||||
|
||||
if "unit_size" in self.x_axis_config:
|
||||
x_length = self.x_axis_config["unit_size"]
|
||||
else:
|
||||
x_length = round(config.frame_width) - 2
|
||||
|
||||
if "unit_size" in self.y_axis_config:
|
||||
y_length = self.y_axis_config["unit_size"]
|
||||
else:
|
||||
y_length = round(config.frame_width) - 2
|
||||
|
||||
self.x_axis = self._create_axis(self.x_range, self.x_axis_config, self.x_length)
|
||||
self.y_axis = self._create_axis(self.y_range, self.y_axis_config, self.y_length)
|
||||
|
||||
|
|
|
|||
|
|
@ -407,9 +407,11 @@ def deprecated_params(
|
|||
|
||||
@deprecated_params(
|
||||
redirections=[
|
||||
lambda buff=1: {"buff_x": buff[0], "buff_y": buff[1]}
|
||||
if isinstance(buff, tuple)
|
||||
else {"buff_x": buff, "buff_y": buff}
|
||||
lambda buff=1: (
|
||||
{"buff_x": buff[0], "buff_y": buff[1]}
|
||||
if isinstance(buff, tuple)
|
||||
else {"buff_x": buff, "buff_y": buff}
|
||||
)
|
||||
]
|
||||
)
|
||||
def foo(**kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue