import matplotlib.pyplot as plt
from scipy.interpolate import BPoly
from being.plotting import plot_spline_2

# Polynomial coefficient matrix
c = [[0, 2], [0, 2], [2, 1], [2, 1]]

# Knots or breakpoints
x = [0, 1, 3]

spline = BPoly(c, x)

plot_spline_2(spline)
plt.xlabel('Time')
plt.ylabel('Position')
plt.show()