Skip to content

Commit d254c72

Browse files
committed
remove any
1 parent a173d79 commit d254c72

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

interpolatepy/b_spline.py

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from typing import Any
2-
31
import matplotlib.pyplot as plt
42
import numpy as np
53

@@ -437,15 +435,12 @@ def generate_curve_points(self, num_points: int = 100) -> tuple[np.ndarray, np.n
437435

438436
return u_values, curve_points
439437

440-
def plot_2d( # noqa: PLR0913, PLR0917
438+
def plot_2d(
441439
self,
442440
num_points: int = 100,
443441
show_control_polygon: bool = True,
444442
show_knots: bool = False,
445443
ax: plt.Axes | None = None,
446-
curve_style: dict[str, Any] | None = None,
447-
control_style: dict[str, Any] | None = None,
448-
knot_style: dict[str, Any] | None = None,
449444
) -> plt.Axes:
450445
"""
451446
Plot a 2D B-spline curve with customizable styling.
@@ -499,11 +494,6 @@ def plot_2d( # noqa: PLR0913, PLR0917
499494
"label": "Knot points",
500495
}
501496

502-
# Apply user styles or defaults
503-
curve_style = {**default_curve_style, **(curve_style or {})}
504-
control_style = {**default_control_style, **(control_style or {})}
505-
knot_style = {**default_knot_style, **(knot_style or {})}
506-
507497
# Create a new figure if needed
508498
if ax is None:
509499
_, ax = plt.subplots(figsize=(10, 6))
@@ -512,11 +502,11 @@ def plot_2d( # noqa: PLR0913, PLR0917
512502
_, curve_points = self.generate_curve_points(num_points)
513503

514504
# Plot the curve
515-
ax.plot(curve_points[:, 0], curve_points[:, 1], **curve_style)
505+
ax.plot(curve_points[:, 0], curve_points[:, 1], **default_curve_style)
516506

517507
# Plot the control points and polygon if requested
518508
if show_control_polygon:
519-
ax.plot(self.control_points[:, 0], self.control_points[:, 1], **control_style)
509+
ax.plot(self.control_points[:, 0], self.control_points[:, 1], **default_control_style)
520510

521511
# Plot the knot points if requested
522512
if show_knots:
@@ -525,7 +515,7 @@ def plot_2d( # noqa: PLR0913, PLR0917
525515
unique_knots = np.unique(valid_knots)
526516

527517
knot_points = np.array([self.evaluate(k) for k in unique_knots])
528-
ax.plot(knot_points[:, 0], knot_points[:, 1], **knot_style)
518+
ax.plot(knot_points[:, 0], knot_points[:, 1], **default_knot_style)
529519

530520
# Set labels and title
531521
ax.set_xlabel("X")
@@ -541,8 +531,6 @@ def plot_3d(
541531
num_points: int = 100,
542532
show_control_polygon: bool = True,
543533
ax: plt.Axes | None = None,
544-
curve_style: dict[str, Any] | None = None,
545-
control_style: dict[str, Any] | None = None,
546534
) -> plt.Axes:
547535
"""
548536
Plot a 3D B-spline curve.
@@ -586,10 +574,6 @@ def plot_3d(
586574
"label": "Control polygon",
587575
}
588576

589-
# Apply user styles or defaults
590-
curve_style = {**default_curve_style, **(curve_style or {})}
591-
control_style = {**default_control_style, **(control_style or {})}
592-
593577
# Create a new figure if needed
594578
if ax is None:
595579
fig = plt.figure(figsize=(10, 8))
@@ -599,15 +583,15 @@ def plot_3d(
599583
_, curve_points = self.generate_curve_points(num_points)
600584

601585
# Plot the curve
602-
ax.plot(curve_points[:, 0], curve_points[:, 1], curve_points[:, 2], **curve_style)
586+
ax.plot(curve_points[:, 0], curve_points[:, 1], curve_points[:, 2], **default_curve_style)
603587

604588
# Plot the control points and polygon if requested
605589
if show_control_polygon:
606590
ax.plot(
607591
self.control_points[:, 0],
608592
self.control_points[:, 1],
609593
self.control_points[:, 2],
610-
**control_style,
594+
**default_control_style,
611595
)
612596

613597
# Set labels and title

0 commit comments

Comments
 (0)