Silverfrost Forums

Welcome to our forums

Designer's settings

6 Jul 2023 1:06 (Edited: 6 Jul 2023 6:35) #30414

Try to change anything in Designer's mode (icon in top left corner). It changes but does not allow you to see that. You do not see the result until you reload the EXE file.

Also what clearly missing in this mode is automatic settings for Y maximum value. Initially when you run plot for the first time it works ok, the plot finds maximum value and draws all lines correctly automatically. But if you set maximum value manually then you have no way to go back to automatic maximum value plotting. So the option 'Auto' in 'Maximum values' would solve that small but annoying defect.

use clrwin
   integer, parameter :: ndim=2000
   real*8 X(ndim), Y(ndim), T(ndim), Z(ndim)
   integer  np(2)
   integer, external :: SnapshotPLDopMap

   Ez0 = 624
   Ez1 = 1506
   do i=1,ndim
   X(i) = 600+ i*100;  y(i) = 4e-14 * 1 * log(x(i)/Ez0) /(x(i)*Ez0)
   enddo

   do i=1,ndim
   t(i) = 1600 + i*100; z(i) = 4e-14 * 8 * log(t(i)/Ez1) /(t(i)*Ez1)
   enddo


   np(1)= ndim
   np(2)= ndim
 
   CALL winop@('%pl[file=Settings.set]')
   call winop@('%pl[framed]')
   CALL winop@('%pl[gridlines]')
   call winop@('%pl[axes_pen=2,frame_pen=2,width=2.]')
   i = winio@('%fn[Tahoma]&')
   i = winio@('%ts%bf&', 1.8d0) 
   lx = 900
   ly = 600

   i=winio@('%pl[x_axis='Energy  ( eV )',y_axis=' Crossection  ( cm^2 )',&
     &colour=black, colour=red, n_graphs=2, independent, x_array, scale=log_log,x_min=100.,y_min=1.e-21]%ff&',&
       lx, ly, np, X, Y, T, Z )
   i=winio@('%sf%cn%^bt[ Snapshot ]   %`bt[ OK ]%es', SnapshotPLDopMap)
   end

!......................................................
!   ____  __ _   __   ____  ____  _  _   __   ____ 
!  / ___)(  ( \ / _\ (  _ \/ ___)/ )( \ /  \ (_  _)
!  \___ \/    //    \ ) __/\___ \) __ ((  O )  )(  
!  (____/\_)__)\_/\_/(__)  (____/\_)(_/ \__/  (__) 
!......................................................

  integer function SnapshotPLDopMap()
  use clrwin

	character  PNGfilename*256, chdate*8, chtime*10, chzone*5
	integer ivalues(8)

	call DATE_AND_TIME(chdate, chtime, chzone, ivalues ) ! chdate format 20210504
	PNGfilename = '_Screenshot_'//chdate(1:8)//'_'//chtime(1:6) !  //'_'//chtime(1:6)//'.png'
       
 	PNGfilename=trim(PNGfilename)//'.png'

        i = export_image@(trim(PNGfilename))

    SnapshotPLDopMap= 2
  end function
6 Jul 2023 1:44 #30415

Even worse, this example does not allow to set in Designer's mode anything even blindly without seeing results like did previous example, it simply crashes

   use clrwin
   integer, parameter :: ndim=2000
   real*8 X(ndim), Y(ndim), Eex(10), Crsex(10)
   real*8 Emyfit(ndim), CrsMyFit(ndim)
   integer  np(3)
   integer, external :: SnapshotPLDopMap

   Ez0 = 624

   do i=1,ndim
     X(i) = 600+ i*100; y(i) = 4e-14 * 1 * log(x(i)/Ez0) /(x(i)*Ez0)
   enddo

   Eex(1) = 5.419E+02
   Eex(2) = 5.475E+02
   Eex(3) = 5.649E+02
   Eex(4) = 6.190E+02
   Eex(5) = 7.870E+02
   Eex(6) = 1.308E+03
   Eex(7) = 2.924E+03
   Eex(8) = 7.941E+03
   Eex(9) = 2.351E+04
   Eex(10)= 7.181E+04

   Crsex(1) =1.340E-21
   Crsex(2) =4.060E-21
   Crsex(3) =1.170E-20
   Crsex(4) =2.980E-20
   Crsex(5) =5.760E-20
   Crsex(6) =7.270E-20
   Crsex(7) =5.400E-20
   Crsex(8) =2.610E-20
   Crsex(9) =1.020E-20
   Crsex(10)=3.640E-21

   A = 1.298
   C = 1.206
   E0 = 539.

   do i=1, ndim
     E = E0 + i*29 - 22
     EmyFit  (i) = E
     CrsMyFit (i) = 5.72e-14 * A * (log(E/E0))  / ( E0**2 * (E/E0)**C   )
   enddo

   np(1)= ndim
   np(2)= 10
   np(3) = ndim
 
   CALL winop@('%pl[file=Settings.set]')
   call winop@('%pl[framed]')
   call winop@('%pl[axes_pen=2,frame_pen=2,width=2]')
   CALL winop@('%pl[gridlines]')

   i = winio@('%fn[Tahoma]&') 
   i = winio@('%ts%bf&', 1.8d0)
   lx = 900
   ly = 600

   i=winio@('%pl[x_axis='Energy  ( eV )',y_axis=' Crossection  ( cm^2 )',&
     &colour=black, colour=red, n_graphs=3, independent, x_array, scale=log_log,x_min=100.,x_max=1.e5,y_min=1.e-21]%ff&',&
     & lx, ly, np, X, Y, Eex,Crsex, EmyFit, CrsMyFit)

   i=winio@('%sf%cn%^bt[ Snapshot ]   %`bt[ OK ]%es', SnapshotPLDopMap)
   end

!......................................................
!   ____  __ _   __   ____  ____  _  _   __   ____ 
!  / ___)(  ( \ / _\ (  _ \/ ___)/ )( \ /  \ (_  _)
!  \___ \/    //    \ ) __/\___ \) __ ((  O )  )(  
!  (____/\_)__)\_/\_/(__)  (____/\_)(_/ \__/  (__) 
!......................................................

  integer function SnapshotPLDopMap()
  use clrwin

	character  PNGfilename*256, chdate*8, chtime*10, chzone*5
	integer ivalues(8)

	call DATE_AND_TIME(chdate, chtime, chzone, ivalues ) ! chdate format 20210504
	PNGfilename = '_Plot_'//chdate(1:8)//'_'//chtime(1:6) !  //'_'//chtime(1:6)//'.png'
      

	PNGfilename=trim(PNGfilename)//'.png'

        i = export_image@(trim(PNGfilename))

        call sound@(3000,1)
        call sound@(1000,1)
        call sound@(2000,1)


    SnapshotPLDopMap= 2
  end function
6 Jul 2023 8:01 #30416

This may help track down the issue in the first example posted by Dan.

For the %pl[SCALE=option], of the four available options, LINEAR, LOG_LINEAR, LINEAR_LOG, and LOG_LOG, the display vanishing in Designer mode only occurs with LINEAR_LOG and LOG_LOG, i.e. when log scales are requested on the y-axis.

6 Jul 2023 3:31 #30417

Thank you for the feedback. I have made a note of this issue.

6 Jul 2023 6:21 #30418

Thanks Ken, your finding allowed me to complete the plot using working option log_linear, adjust the plot and then return to log_log

  • Another problem i noticed is that if you remove the line which sets Designer's mode

CALL winop@('%pl[file=Settings.set]')

the X scale numbering changes from the mix of scientific and engineering (100,1000,104, 105 ) to purely scientific 102, 103, 104, 105. In my case the latter one would be more appropriate, so i will be forced to photoshop it into the final plot

May be good would be to explicitly introduce these numbering options.

  • Also intersection of lower X and left Y axis still has some fancy mark. I think it was used for debugging but was forgotten. It can be left there but by default it definitely has not to appear, i always try to photoshop it out

  • Option to print the data plotted would be nice too because the plotted data is smoothed and hence extends the original data

Please login to reply.