You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got an error "AttributeError: module 'mpl_toolkits.mplot3d.proj3d' has no attribute 'line2d_seg_dist'" when running on the matplotlib 3.4.2, it is a deprecated method. Is there an update for this? I added the line2d_seg_dist method to the pick_info.py file to replace it, and it is feasible for the time being.
def line2d_seg_dist(p1, p2, p0):
"""distance(s) from line defined by p1 - p2 to point(s) p0
p0[0] = x(s)
p0[1] = y(s)
intersection point p = p1 + u*(p2-p1)
and intersection point lies within segment if u is between 0 and 1
"""
x21 = p2[0] - p1[0]
y21 = p2[1] - p1[1]
x01 = np.asarray(p0[0]) - p1[0]
y01 = np.asarray(p0[1]) - p1[1]
u = (x01*x21 + y01*y21) / (x21**2 + y21**2)
u = np.clip(u, 0, 1)
d = np.hypot(x01 - u*x21, y01 - u*y21)
return d
The text was updated successfully, but these errors were encountered:
I got an error "AttributeError: module 'mpl_toolkits.mplot3d.proj3d' has no attribute 'line2d_seg_dist'" when running on the matplotlib 3.4.2, it is a deprecated method. Is there an update for this? I added the line2d_seg_dist method to the pick_info.py file to replace it, and it is feasible for the time being.
def line2d_seg_dist(p1, p2, p0):
"""distance(s) from line defined by p1 - p2 to point(s) p0
The text was updated successfully, but these errors were encountered: