source('iterate_logistic.R') #postscript("../../WriteUp/Graphics/Chapter2/chap_2_sect_9_prob_15_plot.eps", onefile=FALSE, horizontal=FALSE) rho = 3.2 #rho = 2.6 # try some other values for rho #rho = 2.8 #rho = 3.4 N = 30 u1 = iterate_logistic(rho, 0.2, N) u2 = iterate_logistic(rho, 0.4, N) u3 = iterate_logistic(rho, 0.6, N) u4 = iterate_logistic(rho, 0.8, N) all_us = c( u1, u2, u3 ) min_us = min( all_us ) max_us = max( all_us ) plot( 0:(N-1), u1, type='l', col='red', ylim=c(min_us, max_us), xlab='n', ylab='' ) lines( 0:(N-1), u2, type='l', col='blue') lines( 0:(N-1), u3, type='l', col='cyan') lines( 0:(N-1), u4, type='l', col='black') grid() title(sprintf('rho= %f', rho)) #dev.off()