Kenneth_Smith
Joined: 18 May 2012 Posts: 831 Location: Lanarkshire, Scotland.
|
Posted: Wed Aug 13, 2025 12:10 pm Post subject: %pl[frame,scale=linear_log] |
|
|
Paul,
Something that needs looking at when you have time. In the second %pl graph the options frame and scale=linear_log are used. The resulting plot is not correct. Please see my mark up here:
https://www.dropbox.com/scl/fi/whuaiw6wfwhy8zpu0r6ss/Screenshot-2025-08-13-120045.jpg?rlkey=pqjut46zi1uabeqk6netkmbtk&st=rl1kaxh5&dl=0
Code: |
program p
use clrwin
implicit none
integer, parameter :: n = 100
integer :: i, iw
real*8 :: x(n), y(n)
real*8 :: xend = 10.d0**3, xstart = 10.d0**(-1), twopi = 8.d0*atan(1.d0)
! Log spaced x values
x = [( 10.0d0**(log10(xstart) + (i-1)*(log10(xend)-log10(xstart))/(n-1)), i=1,n )]
! y(x) = sin(2pi * log10(x)) will produce a repeating sine pattern evenly
! spaced on the semilog x-axis so you can immediately tell if the x-axis
! is scaled correctly.
y = sin(twopi*log10(x))
iw = winio@('%fn[Tahoma]%bf%ts&',1.5d0)
call winop@('%pl[n_graphs=1,native,width=3,gridlines]')
call winop@('%pl[colour=red,x_array,scale=linear_log]')
iw = winio@('%ta%pl&', 600, 600, size(y,kind=3), x, y)
call winop@('%pl[n_graphs=1,native,width=3,gridlines]')
call winop@('%pl[frame]')
call winop@('%pl[colour=red,x_array,scale=linear_log]')
iw = winio@('%ta%pl', 600, 600, size(y,kind=3), x, y)
end program p |
|
|