Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot_spline_2d(): call plot_vertices_2d() with "ax" #38

Merged
merged 2 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/euclidean/bezier-de-casteljau.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
" ax = plt.gca()\n",
" times = np.linspace(0, 1, dots)\n",
" ax.plot(*func(points, times).T, '.')\n",
" plot_vertices_2d(points)\n",
" plot_vertices_2d(points, ax=ax)\n",
" ax.set_title(func.__name__ + ' Bézier curve')\n",
" ax.axis('equal')"
]
Expand Down
2 changes: 1 addition & 1 deletion doc/euclidean/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def plot_spline_2d(spline, dots_per_second=15, marker='.', linestyle='',
total_duration = spline.grid[-1] - spline.grid[0]
dots = int(total_duration * dots_per_second) + 1
times = spline.grid[0] + _np.arange(dots) / dots_per_second
plot_vertices_2d(spline.evaluate(spline.grid), chords=chords)
plot_vertices_2d(spline.evaluate(spline.grid), chords=chords, ax=ax)
ax.plot(
*spline.evaluate(times).T,
marker=marker,
Expand Down