In the subroutine below it is better to write
x=real([-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8], kind=wp)
instead of
x=dble([-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8])
for flexibility.
subroutine exmp01
type(gpf):: gp
integer, parameter:: n=17
real(wp):: x(n)
real(wp):: y(n)
! Input data
! x=dble([-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8])
x=dble([-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8])
x= abs(x) + 5
y=dble([66,51,38,27,18,11,6,3,2,3,6,11,18,27,38,51,66])
! Annotation: set title, xlabel, ylabel
call gp%title('Example 1. A simple xy plot','#990011')
call gp%xlabel('my x axis ...','#99aa33',font_name="Tahoma")
! call gp%ylabel('my y axis ...')
call gp%options('set border lc "#99aa33"; set ylabel "my label..." tc "#99aa33"')
call gp%options('set logscale y2')
call gp%plot(x, y)
end subroutine exmp01
The program does not compile if wp = sp in ogpf.f90.
In the subroutine below it is better to write
x=real([-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8], kind=wp)instead of
x=dble([-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8])for flexibility.
The program does not compile if
wp = spin ogpf.f90.