Skip to content

Commit 45c886c

Browse files
committed
defined function to draw course points
1 parent 6ccde1c commit 45c886c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/components/course/cubic_spline_course/cubic_spline_course.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ def __init__(self, x_ref_points, y_ref_points, target_speed_kmph, resolution=0.1
5050
self.speed_array[-1] = 0.0
5151

5252
self.color = color
53-
54-
55-
csc = CubicSplineCourse([0.0, 10.0, 25, 40, 50], [0.0, 4, -12, 20, -13], 10)
53+
54+
def draw(self, axes, elems):
55+
"""
56+
Function to draw points on course
57+
axes: Axes object of figure
58+
elems: List of plot objects
59+
"""
60+
61+
course_plot, = axes.plot(self.x_array, self.y_array, linewidth=0, marker='.', color=self.color, label="Course")
62+
elems.append(course_plot)

0 commit comments

Comments
 (0)