Skip to content

Commit 7d58fdd

Browse files
committed
add dims handling for 3d branch
1 parent 115340c commit 7d58fdd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spatialmath/base/animate.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ def __init__(
104104
# ax.set_zlim(dims[4:6])
105105
# # ax.set_aspect('equal')
106106
ax = smb.plotvol3(ax=ax, dim=dim)
107+
if dim is not None:
108+
if len(dim) == 2:
109+
dim = dim * 3
110+
ax.set_xlim(dim[0:2])
111+
ax.set_ylim(dim[2:4])
112+
ax.set_zlim(dim[4:])
107113

108114
self.ax = ax
109115

0 commit comments

Comments
 (0)