Skip to content

Commit 114ab6d

Browse files
authored
Fixed PyPlot.py
Keyword arguments need to be explicitly stated or these will be interpreted as positional arguments, leading to a crash.
1 parent 2a8111b commit 114ab6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

roboticstoolbox/backends/PyPlot/PyPlot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,11 +572,11 @@ def update(val, text, robot): # pragma: no cover
572572

573573
if robot.isrevolute(j):
574574
slider = Slider(
575-
ax, "q" + str(j), qlim[0, j], qlim[1, j], np.degrees(q[j]), "% .1f°"
575+
ax, "q" + str(j), qlim[0, j], qlim[1, j], valinit=np.degrees(q[j]), valfmt="% .1f°"
576576
)
577577
else:
578578
slider = Slider(
579-
ax, "q" + str(j), qlim[0, j], qlim[1, j], robot.q[j], "% .1f"
579+
ax, "q" + str(j), qlim[0, j], qlim[1, j], valinit=robot.q[j], valfmt="% .1f"
580580
)
581581

582582
slider.on_changed(lambda x: update(x, text, robot))

0 commit comments

Comments
 (0)