The program below uses %pl to plot the Bessel function Y1(x) in the range 0 < x < 20
Obviously the first point in the x data arrays cannot be zero since Y1(0) is negative infinity.
We can also use the %pl option y_min to clip the large negative values (so effectively the line being plotted starts somewhere outside the %pl frame, and should appear where it crosses the lower horizontal edge of the frame.
Certain combinations of the starting x value (and hence starting y value) combined with the value specified for y_min run into problems. This can be seen in the second plot produced by this program. Here is a screenshot.
https://www.dropbox.com/scl/fi/fodkuemt1ykexr10v2vl2/Screenshot-2026-01-09-105813.jpg?rlkey=3u7gogu8lbem1xw52ejkbu9re&st=4ld4pjgp&dl=0
program test
use clrwin
implicit none
real*8 x_pl1(200), y1_pl1(200)
real*8 x_pl2(200), y1_pl2(200)
real*8 x_pl3(200), y1_pl3(200)
integer i, iw
x_pl1(1) = 0.0001d0 !Y0 of zero is - infinity so start a small distance away from zero
do i = 2, 200
x_pl1(i) = x_pl1(i-1) + 0.1d0
end do
y1_pl1=bessel_y1(x_pl1)
print*, 'First point in first graph at : ', x_pl1(1), y1_pl1(1)
call winop@('%pl[native,n_graphs=1,x_array,width=3]')
call winop@('%pl[frame,etched,gridlines]')
call winop@('%pl[link=lines, colour=blue]')
call winop@('%pl[y_max=1,y_min=-1,x_max=20]') ! Clip y-axis at -1
iw = winio@('%pl&',500,400,200,x_pl1,y1_pl1)
x_pl2(1) = 0.00001d0 ! Start closer to zero
do i = 2, 200
x_pl2(i) = x_pl2(i-1) + 0.1d0
end do
y1_pl2=bessel_y1(x_pl2)
print*, 'First point in second graph at : ', x_pl2(1), y1_pl2(1)
call winop@('%pl[native,n_graphs=1,x_array,width=3]')
call winop@('%pl[frame,etched,gridlines]')
call winop@('%pl[link=lines,colour=blue]')
call winop@('%pl[y_max=1,y_min=-1,x_max=20]') ! Clip y-axis at -1
iw = winio@('%pl&',500,400,200,x_pl2,y1_pl2)
x_pl3(1) = 0.00001d0
do i = 2, 200
x_pl3(i) = x_pl3(i-1) + 0.1d0
end do
y1_pl3=bessel_y1(x_pl3)
print*, 'First point in third graph at : ', x_pl3(1), y1_pl3(1)
call winop@('%pl[native,n_graphs=1,x_array,width=3]')
call winop@('%pl[frame,etched,gridlines]')
call winop@('%pl[link=lines,colour=blue]')
call winop@('%pl[y_max=1,y_min=-2,x_max=20]') ! Clip y-axis at -2
iw = winio@('%pl',500,400,200,x_pl3,y1_pl3)
end program test
PS If i plot -Y1, i.e. the mirror image (reflected in the X axis) everthing is ok.