I'm having a curve as follows:
The curve is generated with the following code:
import matplotlib.pyplot as plt
import numpy as np
# normalize array
def min_max_scale_array(arr):
arr = np.array(arr)
return (arr - arr.min())/(arr.max()-arr.min())
x = np.linspace(-50,48,100)
y = x**2 + 2*x + 2
x = min_max_scale_array(x)
y = min_max_scale_array(y)
fig, ax = plt.subplots()
ax.plot(x, y)
How can I generate a new curve by moving only the bottom left (or right) and keeping both ends the same like this? Thank you!
Edit: any curve generating algorithm is appreciated, as long as it works!




