program logistic_graph real pt_x(3),pt_y(3),xl(2),yl(2) c write(*,*)'what is the initial value of x?' c read(*,*)x_ini x_ini=0.5 write(*,*)'what is the value of r?' read(*,*)r if(pgopen('/xwin')<=0)stop call pgenv(0.0,1.0,0.0,1.0,1,0) call pgsci(2) dx=(1.0-0.0)/999 c n_group_size=1000/15 n_group_size=5 do i=1,1000 x=0.0+(i-1)*dx y=4*r*x*(1-x) call pgpt(1,x,y,-1) enddo call pgsci(1) xl(1)=0.0 ; yl(1)=0.0 xl(2)=1.0 ; yl(2)=1.0 call pgline(2,xl,yl) pt_x(1)=x_ini pt_y(1)=0.0 n=100 call pgsci(3) do i=1,n x=pt_x(1) pt_x(2)=pt_x(1) y=4*r*x*(1-x) pt_x(2)=x pt_y(2)=y pt_y(3)=pt_y(2) pt_x(3)=pt_y(3) m=3+i/n_group_size call pgsci(m) call pgline(3,pt_x,pt_y,-1) pt_x(1)=pt_x(3) pt_y(1)=pt_y(3) end do call pgclos end