- OK, we are close to the end of needed major fixes and improvements for the native PL to make it absolutely perfect. All people do XY plotting and all need and definitely will appreciate them (excluding neo-Luddites). May be only few suggestions are left. One is to improve stability of LOG plotting when there are many functions plotted which needs more efforts from my side to make a demo. Another is more general suggestion for a whole Clearwin controls alignments we will discuss some time later. Both were somewhat discussed before in this forum.
Now let's return to this code I posted above again. This suggestion was also already discussed before but may be it was not clearly articulated.
use clrwin
parameter (N = 2*2*2)
real*8 X(N), Y(N)
Data X/0.01,0.1,1,10, 100,1000,10000,100000/
Data Y/0.011,0.044,0.33,2.2,66,3333,1111,777/
!... Regular Plot
call winop@('%pl[x_axis='X Axis Title',y_axis='Y Axis Title']')
i=winio@('%ww%pv%pl[native,x_array,scale=log_log,N_GRAPHS=1]%lw', 800,600, n, X, Y, ilw)
!... Design Mode Plot
i=winio@('%sf%ts%bf%es&', 2d0)
call winop@('%pl[x_axis='X Axis Title',y_axis='Y Axis Title',file=zSetts.set]')
i=winio@('%ww%pv%pl[native,x_array,scale=log_log,N_GRAPHS=1]', 800,600, n, X, Y)
end
We can find screen coordinates XX and YY for each point on this screen using
call get_plot_point@(X, Y, YY, YY)
(why XX and YY are not INTEGER but REAL*8 by the way? They change from 1 to 800 and from 1 to 600 only) but because the internal code always puts all tics on each axis based on its own considerations on how they should ideally look for the human eye, we never know what are screen coordinates for the 4 key X and Y (and XX and YY) axial intersections of the graph will be. We will know beginning and end points of X and Y coordinate points only if we set up them manually.
But the %PL code of course knows what beginning and end values of X and Y and XX and YY are internally because without their knowledge it is impossible to make any graphs.
The function is needed which returns the knowledge of these 4 pairs of X and Y and 4 pairs of XX and YY coordinates to the user.