In the following code y = x**2 is plotted using 6 different sets of %pl options (using 64 bit compiler with checkmate - so by default we are using the native %pl).
In the second case, a blank graphics region is produced, which can be corrected by adding the n_graphs=1 option. The default value for n_graphs is 1, and this declaration is not required in the other cases.
It's not clear to me why n_graphs=1 is required in one particular case, but not in any of the others? Is this a bug or am I missing something here?
program p1
use clrwin
implicit none
real*8 :: y1(1:10), x1(1:10), xstart=1.d0, dx=1.d0
integer :: i
x1 = [(i, i=1,10)]
y1 = [(i**2, i=1,10)]
! Without x_array option
i = winio@('%pl[native]', 500,500,10,xstart,dx,y1) ! This produces the expected plot.
! The [native] option is the default for the 64 bit compiler
! so this declaration is redundant. Yet removing it changes
! the outcome.
i = winio@('%pl', 500,500,10,xstart,dx,y1) ! This produces a blank plot. #####
! To get back to the expected plot add [n_graphs = 1]
i = winio@('%pl[n_graphs=1]', 500,500,10,xstart,dx,y1) ! This produces the expected plot. But n_graphs = 1 is the
! default (as in the first example) so why is this necessary?
! Shouldn't the first two winio calls produce identical plots?
! With x_array option
i = winio@('%pl[native,x_array]', 500,500,10,x1,y1) ! This produces the expected plot.
i = winio@('%pl[x_array]', 500,500,10,x1,y1) ! This produces the expected plot. n_graphs=1 is not required.
i = winio@('%pl[x_array,n_graphs=1]',500,500,10,x1,y1) ! This produces the expected plot.
end program p1