Skip to content

Commit

Permalink
Fix plotting for using sleap-io API (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
eberrigan authored Jul 26, 2023
1 parent ab2642e commit 1d30dbd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sleap_roots/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,9 @@ def plot_instance(
h_lines.append(h_lines_k)

else:
for k, (src_node, dst_node) in enumerate(skeleton.edges):
src_pt = instance.points_array[instance.skeleton.node_to_index(src_node)]
dst_pt = instance.points_array[instance.skeleton.node_to_index(dst_node)]
for k, (src_ind, dst_ind) in enumerate(skeleton.edge_inds):
src_pt = inst_pts[src_ind]
dst_pt = inst_pts[dst_ind]

x = np.array([src_pt[0], dst_pt[0]])
y = np.array([src_pt[1], dst_pt[1]])
Expand Down

0 comments on commit 1d30dbd

Please sign in to comment.