#!/usr/bin/env python3

# Plot the value after N iterations of a 1-D map, for different values of
# mu
# 
# Example: superstable(0,0.001,1,1000)

import numpy as np
import matplotlib.pyplot as plt

def superstable(mu_start, mu_interval, mu_stop, N):

    plt.figure()
    x0=0.5;       # initial condition

    mu = np.arange(mu_start,mu_stop,mu_interval)
    
    for i in range(0,len(mu)):
        x = x0*np.ones((N+1))
        for j in range(0,N):
            x[j+1] = 4*mu[i]*x[j]*(1-x[j]) # logistic map
    
        plt.scatter(mu[i], x[len(x)-1],color='black',s=0.2);
    
    plt.show()







