Created
August 30, 2018 15:30
-
-
Save AlexEshoo/1cb9d15f220fd35f519b9b7ebe1676f3 to your computer and use it in GitHub Desktop.
Parametric Spline path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib import pyplot as plt | |
import numpy as np | |
from scipy.interpolate import interp1d | |
t = np.linspace(0, 10, 5) | |
x = np.array([0, 2, 3, 10, 15]) | |
y = np.array([0, 1, 2, 8, 15]) | |
f = interp1d(x,y, kind='cubic') | |
plt.plot(np.linspace(0,15,1000), f(np.linspace(0,15,1000))) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment