Kenneth_Smith
Joined: 18 May 2012 Posts: 828 Location: Lanarkshire, Scotland.
|
Posted: Mon Jul 28, 2025 3:35 pm Post subject: %pl[link=lines,width=1] vs. %pl[link=lines,width=3] |
|
|
In the following program two %pl graphs are used to plot identical data.
The data is an impulse function � zero everywhere but at one point where is it 10 units.
The first %pl with %pl[WIDTH=1] draws the expected graph. In the second %pl with %pl[WIDTH=3] the graph overshoots the desired magnitude of the impulse (by far more than 3 pixels).
Please see the annotated graphic below:
https://www.dropbox.com/scl/fi/5vk4iin61argojqmkhfgq/Screenshot-2025-07-28-150549.jpg?rlkey=5zlx6vqrapgc6h4mkdjaictml&st=6cpbqh0l&dl=0
For both %pl graphs the link option is set to LINES, so this should not be related to the default �TENSION� setting.
If the parameter N (number of data points) is reduced from 200 to 20, this does not occur.
I am using the 22nd June FTN95 and DLLs.
Sorry Paul, I broke %pl again!
Code: |
program test_pl
use clrwin
implicit none
integer, parameter :: n = 200 !## Change n to 20 and everthing is OK
integer :: i, iw
real*8 :: x(n), y(n)
do i = 1, n
x(i) = i
end do
y = 0.d0
y(n/2) = 10.d0 ! Magnitude 10 impulse at one time instant
print*, 'min/max y = ', minval(y), maxval(y)
! This graph is drawn correctly
call winop@('%pl[native,n_graphs=1,x_array,link=lines,gridlines,y_min=0,y_max=12,symbol=10]')
call winop@('%pl[width=1]') !###
call winop@('%pl[Title="This graph is correct with width=1"]')
iw = winio@('%pl&',900,300,n,x,y)
! This graph has a problem
call winop@('%pl[native,n_graphs=1,x_array,link=lines,gridlines,y_min=0,y_max=12,symbol=10]')
call winop@('%pl[width=3]') !### only difference between the configuration of the two %pl graphs
call winop@('%pl[Title="This graph is not correct with width=3"]')
iw = winio@('%ff%pl&',900,300,n,x,y)
iw = winio@('')
end program test_pl
|
|
|