When native %PL plots XY graph it automatically finds X and Y minimum and maximum so you do not have to worry about this. Of course you can set these limits in Designer's mode opening it. The problem is that if you set them you will not be able to play back when program finds them automatically. Here is an example.
program aaa use clrwin integer, external :: cb real*8 x(2), y(2) common x, y
x =(/0,10/) y =(/0,10/)
call winop@('%pl[file=designer1.set]') i=winio@('%fn[Tahoma]%ts%bf%ff&',1.2d0) i=winio@('%pl[x_array, n_graphs=1,x_axis='Days',y_axis='Nights']%ff&',400,300,2, x,y) i=winio@('%sf%cn%`bc%^bt[Update]%es%lw', rgb@(255,199,255), cb, ilw) END
integer function cb() use clrwin real8 x(2), y(2) common x, y call RANDOM_NUMBER (x(2)) call RANDOM_NUMBER (y(2)) x(2) = x(2) * 10 + 0.1 y(2) = y(2) * 10 + 0.1 print,' x_max=', x(2), y(2)
call simpleplot_redraw@
cb=2 end function
Click Update few times and see how automatic limits perfectly work. Plotted is simple linear function Y=X with just two points in it and randomly changed maximum value of X or Y and plotted the result
Then click on icon on top left corner which starts Designer's mode and manually set any Maximum Values for X or Y and push Plot and Save.
Click Update button few times again with these numbers and see all works differently but perfectly again.
Now try to return back to automatic mode. I do not see how to do that.
If you are coloring some button %bt with some color using %
bc everything works in almost all windows OK besides the windows where %lw is used. Then color is distorted and is unpredictable. Unexplained, with the main program though (when %lw is in main code) %bc works surprisingly OK (see previous demo example)module mod contains
integer function cb ()
i=winio@('%`bc%^bt[Push me2]%lw', rgb@(255,199,255), cb2,ilw) cb=2 end function
Integer function cb2 () cb2=2 end function
end module !--------------- program aaa use mod i=winio@('%`bc%^bt[Push Me]%es', rgb@(255,199,192), cb) END