estimator = TemplateTransformer()
X_transformed = estimator.fit_transform(X)
plt.plot(X.flatten()/X.max(), label="Original Data")
plt.plot(X_transformed.flatten()/X_transformed.max(), label="Transformed Data")
plt.title("Scaled plots of original and transformed data")
After Change
plt.title("Plots of original and transformed data")
plt.legend(loc="best")
plt.grid(True)
plt.xlabel("Index")
plt.ylabel("Value of Data")
plt.show()