1. 1次元配列を用いた2次元の線図,点図



ソースプログラム(Fortran 90,自動倍精度利用)
!******************************** ! 2D Graphic Sample No. 1 * ! 2D lines and Circles * !******************************** program gsample1 implicit none integer, parameter :: nmax = 5 real, parameter :: pi=3.141592653589793 real x(0:nmax),y(0:nmax),y1(0:nmax) real xmin,xmax,ymax,dx,dy,yy integer i,j,nn character text*10 xmin = 0 xmax = 5. ymax = 1.2 call fr_ginit call fr_opencanvas(1,'gsample1',101) call fr_xyname('x-axis','y-datas') call fr_frame2d(xmin,xmax,-ymax,ymax,10) dx = (xmax-xmin)/nmax do i = 0, nmax x(i) = dx*i+xmin y(i) = 0.1*sin(10*x(i)) enddo nn = 7 dy = 2.0/nn do i = 1, nn yy=dy*i-1.2 call fr_setcircle(20*dy*i) do j = 0, nmax y1(j) = yy + y(j) enddo write(text,'(f5.2)') dy*i call fr_graph2d(x,y1,nmax+1,i,1) call fr_graph2d(x,y1,nmax+1,i,-3) call fr_2dmove(1.0,y1(nmax),1) call fr_fpchars(15.0,0.0,text,i,1,0,0,30) enddo call fr_gend end program gsample1


Copyright (C) Toshihiro Taguchi, Setsunan University, 2000-2012 All rights reserved.