I'm having problems with the values of x2 when trying to slice to display in graphic 2 nothing appears and I can not see where I'm going wrong?
import matplotlib.pyplot as plt
import numpy as np
xold = np.random.rand()
N = 3000
x1 = np.empty((N))
print("x1:", x1)
for k in range(N):
x_new = 4*xold*(1 - xold)
xold = x_new
x1[k] = x_new
comp = len(x1)
x2 = x1 + 0.25*np.std(x1)*np.random.rand(1,comp)
plt.figure(1)
plt.grid(True)
plt.subplot(2,1,1)
plt.plot(x1[:-1], x1[1:], 'bo')
plt.title('MAPA LOGISTICO 1')
plt.ylabel('x1k)')
plt.xlabel('x1(k-1)')
plt.subplot(2,1,2)
plt.plot(x2[:-1], x2[1:], 'bo')
plt.title('MAPA LOGISTICO 2')
plt.ylabel('x(2k)')
plt.xlabel('x2(k-1)')
plt.show()