I would be grateful if somebody who has installed the updated version could test the following code. When I select the 'half extents' button I see data points drawn in the left and right margins of the %pl region. I'm trying to decide if I've corrupted my FTN95 installation or not.
Thanks
Ken
module problem_mod
use clrwin
implicit none
integer, parameter :: dp=kind(1.d0)
integer, parameter :: npoints = 200
real(kind=dp) x(1:npoints), y(1:npoints)
contains
integer function gen_data()
integer i
do i = 1, npoints
x(i) = 2.d0*random@()-1.d0 ; y(i) = 2.d0*random@()-1.d0
end do
gen_data = 2
end function gen_data
integer function plot_data()
integer iw
iw = winio@('%2.1ob&')
call winop@('%pl[native, x_array, n_graphs=1, gridlines, link=none, symbol=6, frame, colour=blue, etched]')
iw = winio@('%pl&',1000,800,npoints,x,y)
iw = winio@('%cb&')
iw = winio@('This button sets xmin=-1, xmax=1, ymin=-1, ymax=1 &')
iw = winio@('%nl%^bt[Full extents]&', full_extents_cb)
iw = winio@('%2nlThis button sets xmin=-0.5, xmax=0.5, ymin=-0.5, ymax=0.5 &')
iw = winio@('%nlThis results in points being plotted in the left and right margins&')
iw = winio@('%nl%^bt[Half extents]&', half_extents_cb)
iw = winio@('%cb&')
iw = winio@(' ')
plot_data = 2
end function plot_data
integer function full_extents_cb()
integer i
i = CHANGE_PLOT_DBL@(0, 'x_min', 0, -1.d0 )
i = CHANGE_PLOT_DBL@(0, 'x_max', 0, 1.d0 )
i = CHANGE_PLOT_DBL@(0, 'y_min', 0, -1.d0 )
i = CHANGE_PLOT_DBL@(0, 'y_max', 0, 1.d0 )
call simpleplot_redraw@()
full_extents_cb = 2
end function full_extents_cb
integer function half_extents_cb()
integer i
i = CHANGE_PLOT_DBL@(0, 'x_min', 0, -0.5d0 ) ; print*, i
i = CHANGE_PLOT_DBL@(0, 'x_max', 0, 0.5d0 ) ; print*, i
i = CHANGE_PLOT_DBL@(0, 'y_min', 0, -0.5d0 ) ; print*, i
i = CHANGE_PLOT_DBL@(0, 'y_max', 0, 0.5d0 ) ; print*, i
call simpleplot_redraw@()
half_extents_cb = 2
end function half_extents_cb
end module problem_mod
program main
use problem_mod
implicit none
integer i
i = gen_data()
i = plot_data()
end program main