import matplotlib.pyplot as plt
import numpy as np
import math
x = np.linspace(2012, 2019, 8)
y1 = np.array([60936407, 63429200, 65708230, 66314155, 69464432, 70694834, 68690468, 64341693])
y2 = np.array([52605, 97507, 320713, 550297, 777495, 1227117, 2018247, 1940147])
y = y2/y1
k=1
p0=0.5
x0=2028
r=0.37
y1=k*p0*math.e**(r*(x-x0))/(k+p0*(math.e**(r*(x-x0))-1))
# 2012 2019
fig, ax = plt.subplots(figsize=(30, 20), facecolor="#f5f5f5")
plt.grid()
ax.plot(x, y, 'o', color='tab:brown')
ax.plot(x, y1)
# 2010 2050
x = np.linspace(2010, 2050)
y2 = [k*p0*math.e**(r*(i-x0))/(k+p0*(math.e**(r*(i-x0))-1)) for i in x]
y3 = 0.99+0*x
fig, ax = plt.subplots(figsize=(30, 20), facecolor="#f5f5f5")
ax.set_xlim([2010, 2050])
ax.set_ylim([0, 1])
plt.grid()
plt.plot(x, y2, x, y3)