Silverfrost Forums

Welcome to our forums

New %pl

12 Apr 2021 8:43 #27494

Paul, Was the major rebuild of native %pl we previewed and discussed around 6 months ago, the one where user can change all after plot is done without all these winop@, added to the latest releases?

i=winio@('filename,%pl', n,x,y)

12 Apr 2021 10:35 #27496

Dan

Yes. You can find details in cwplus.enh and item 450.

12 Apr 2021 12:47 #27503

Paul, But I do not see any examples there !!! Video was about clipboard case

Without an initial examples any explanation how thing work look like a chinese language. I'd like to see minimal size example, literally 5 lines maximum (including XY data) which uses the file for saving settings. I remember that the first impression for using clipboard for saving settings was extremely cumbersome because the clipboard settings were not for human consumption 😃

Am i correct that using the file instead of clipboard to save and read settings will work the following way:

  1. we start the raw %pl with default look.
  2. Default look usually is ugly so we adjust it online to look perfect with mouse and keyboard
  3. and then we will save plot settings to the file
  4. ...and exit EXE file
  5. When we open the plot next time it will automatically use the same settings file and plot us perfect plot

Since the settings format is not for human understanding and consumption, it is better that we just save settings to the file and touch them. Though of course having an option to wrap settings into the source code via clipboard might be sometimes useful too.

12 Apr 2021 3:33 #27510
      WINAPP
      USE clrwin
      PARAMETER(N=11)
      REAL*8 x(N),y(N),z(N)
      DO i=1,N
        x(i)=0.1d0*(i-1)
        y(i)=x(i)*x(i)
        z(i)=x(i)*x(i)*x(i)
      ENDDO
      i=winio@('%bg[BTNFACE]&')
      i=winio@('%ca[Simple plot]%pv&')
      CALL winop@('%pl[n_graphs=2]')
      CALL winop@('%pl[title=Graphs]')
      CALL winop@('%pl[x_array]')
      CALL winop@('%pl[file=plot.dat]')
      i=winio@('%pl&',400,250,N,x,y,z)
      i=winio@('%ff%nl%cn%tt[OK]')
      END
      resources
      1 24 default.manifest
12 Apr 2021 3:48 #27511

Yea, very cool Thanks

14 Apr 2021 5:35 (Edited: 14 Apr 2021 6:05) #27523

Paul, All looks fantastic. This how %pl should be done!

Q: How to change axis captions and title fonts to bold? Can we change their font sizes? Can the font names be changed?

One suggestion: one thing should be changed permanently though: X and Y captions have to be placed in the middle of axis centered. Currently X and Y title are not in their place 99.99% people would like them to see

[color=indigo:27bc7b70b1]/* Now i have to play with it a bit to make the universal setup i like most and then make from it just single like shortcuts for quick include of the graph into the future codes just with one click (shortcut for just one curve on the plot, two curves, 7 etc, the log scale plot, the symbol plot etc). In the codes like PIC with the huge data the ability to quickly plot needed data is as important as PRINT* or WRITE(,) statements, or having visual debugger like SDBG/SDBG64 to see each variable and the code flow in realtime. Where you in the past used PRINT to see some numbers, now you use PLOT because you simply can not comprehend gigabytes of data. This is why adding plots just with the single line of Fortran code (maximum few) becomes so important. I have hundreds of %pl in my codes. But the difficulty to effortlessly include them just with couple lines of code like with the MATLAB and then adjusting without recompilation was huge problem.

Those who use Clearwin should start thinking to create library of shortcuts for quick insertion of Property sheets, list views, warnings etc. Users will exchange best shortcuts in the future, make clip libraries of shortcuts etc [/color:27bc7b70b1]

14 Apr 2021 6:03 #27524

Dan

%pl herits its font from the previous %fn.

If you want the title to have a different font than the other captions then you can draw it in a %pl callback function using %gr drawing routines.

14 Apr 2021 6:46 #27525

Pity there is no bold face in online settings for the plot.

Strange thing is that just adding %bf in the body of the text

      i=winio@('%bf%pl&',400,250,N,x,y,z)

does not work. To add bold face font i have to include also the font name

i=winio@('%fn[Tahoma]&') 
i=winio@('%bf&') 

Also adding shortcut ESC to exit code %es does not work. Is this my setup problem or %es ?

15 Apr 2021 11:58 #27534

%bf works OK for me but the difference between bold and not bold for the default font is not so marked.

%es was broken in the latest DLLs and I plan to provide a fix in a new download later today.

15 Apr 2021 12:53 #27535

Thanks Paul

Do you plan to add Font selection, bold fonts, italic etc to manual online plot Settings (i do not know how do you call these new settings allowing to change plot after it was created) ?

15 Apr 2021 12:58 #27537

Documentation is provided initially in cwplus.enh and then copied to the help files when time allows.

Please login to reply.