program dessiner use plplot implicit none integer :: i real :: a, b, c, d character(len=80) :: version call plgver(version) write (*,'(a,a)') 'plplot version: ', trim(version) call plsdev('xwin') call plinit () call plenv(-2.2, 2.2, -2.2, 2.2, 0, 1) a = 0 b = 0 c = 0 d = 0 do i=1, 100 a = a + 0.01 b = b + 0.02 call dessin_1 (a, b, 12) c = c + 0.03 d = d + 0.04 call dessin_1 (c, d, 13) enddo call plend contains ! ----------------------------- !------------------------------------------------------ subroutine dessin_1 (sha, shb, color) real, intent(in) :: sha, shb integer, intent(in) :: color integer, parameter :: lg = 2000 real :: x(lg), y(lg) real :: k, amp integer :: i ! print *, 'dessin 1' amp = 2.0 do i = 1, lg k = real(i)/real(lg) * 6.2832 * 4.0 x(i) = amp * sin((k+sha)*5) y(i) = amp * cos((k+shb)*3) enddo ! print *, k, x(i), y(i) call plcol0 (15) ! pure white call pllab ("Fuzzfactor", "Yoyodines", "Some nice plots from tTh") call plcol0 (color) call plline (x, y) end subroutine !------------------------------------------------------ subroutine dessin_2 () print *, 'dessin 2' end subroutine !------------------------------------------------------ end program