program logistic_graph real pt_x(3),pt_y(3),xl(2),yl(2) write(*,*)'what is the initial value of x?' read(*,*)x_ini 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 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) call pgline(2,xl,yl) pt_x(1)=x_ini pt_y(1)=0.0 n=1000 call pgsci(2) 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) call pgline(3,pt_x,pt_y,-1) end do call pgclos end