Unable to plot an accurate tangent to a curvature in Python
问题 I have a dataset for curvature and I need to find the tangent to the curve but unfortunately, this is a bit far from the curve. Kindly guide me the issue solution related to the problem. Thank you! My code is as follows: fig, ax1 = plt.subplots() chData_m = efficient.get('Car.Road.y') x_fit = chData_m.timestamps y_fit = chData_m.samples fittedParameters = np.polyfit(x_fit[:],y_fit[:],1) f = plt.figure(figsize=(800/100.0, 600/100.0), dpi=100) axes = f.add_subplot(111) # first the raw data as a