forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New Video
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Martin_K



Joined: 09 Apr 2020
Posts: 227

PostPosted: Wed Jun 24, 2020 10:59 am    Post subject: Reply with quote

Thanks Ken for your valuable help, thanks John for your useful remarks!

I know, I can have a small bug/error in my code which I am already unable to see. I will review it once again (today in the evening), although it already dreams me about the graphics and the code connected with the graphs.

But for general information I have to add the following:

Today, I tested ALL existing graphic symbols for points (symbols 1...13) with
my current code I have and tried ALL graphic functions with each symbol (1-13):

- zoom in,
- zoom out,
- zoom to extents,
- pan in +X direction,
- pan in -X direction,
- pan in +Y direction,
- pan in -Y direction,
- switch off the border, whereas the grid is switched on,
- switch off the grid whereas the border is switched on,
- switch off both graphs,
- switch on both graphs).

RESULT: symbols 1-11 have ABSOLUTELY NO problem and any above mentioned function performs excellent (don´t taking into account the suitability of graphics symbols,
I used them at their default size, but as John wrote, I can play with their size using set symbol_size function).

Symbols 12 and 13 performs problem free with all functions mentioned above EXCEPT the function switch off grid graph (switching on/off the border line is OK also with these symbols).
Simply, as soon as I switch of the grid (I see then only border line) and then I again switch on the grid back, the grid never displays and I have to close the graphs and re-open them again.

So, a magic must be there or so.

Martin
Back to top
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 697
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Wed Jun 24, 2020 1:54 pm    Post subject: Reply with quote

Martin,

I now understand the complexity of your function to set the symbols. You have four controls to control grid on/off and border on/off. You actually only need two. One for the grid ON/OFF and one for border ON/OFF.

Your analysis appears to indicate that there is indeed an issue with symbol 12 and 13. QUESTION Does the sample code I posted this morning via drop box work as expected when compiled on your machine? I wrote this last night to specifically try and replicate your problem.

Ken
Back to top
View user's profile Send private message Visit poster's website
Martin_K



Joined: 09 Apr 2020
Posts: 227

PostPosted: Wed Jun 24, 2020 8:48 pm    Post subject: Reply with quote

Thanks Ken for your new code!

I tested it on my machine and have the following information for you:

Functions:

- zoom in
- zoom out
- zoom to extents
- pan pps X
- pan neg X
- pan pos Y
- pan neg Y
- new data

ALL work problem free!


As soon as I switch off the buttons (by unchecking their boxes):

- Idc
- Iac
- Linst

and then I switch them on again (by checking their boxes)

NO GRAPHS ARE DISPLAYED at all!

So - similar behaviour like with my two graphs (the difference is that in my case by switching on again the graph with SK border line, this line is displayed, only grid points in the grid graph are not displayed again).

It means, either I have a specific problem with my machine (I do not believe it, although I cannot exclude it fully or there is really a problem with symbol 12 (and also 13).

I switched on/off your graphs in all combinations, no one was again displayed after its switching off.

Martin
Back to top
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 697
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Wed Jun 24, 2020 10:05 pm    Post subject: Reply with quote

Works for me on both Windows 8.1 and 10.

https://youtu.be/nBf6J1c0v1o

At a loss to know what else you could try.

Perhaps some of the other users would be good enough to try the sample code from my post Wed Jun 24, 2020 8:21 am and report back their experience?
Back to top
View user's profile Send private message Visit poster's website
Martin_K



Joined: 09 Apr 2020
Posts: 227

PostPosted: Thu Jun 25, 2020 8:51 am    Post subject: Reply with quote

Ken,

below are videos taken from my machine:

1. Your graphs with Symbol 10
https://www.youtube.com/watch?v=TOj2D4AU_Uo

result: OK

2. Your graphs with Symbol 12
https://www.youtube.com/watch?v=qiJ9rfRrg2o

result: not OK

3. My graphs with Symbol 10, symbol size 2
https://www.youtube.com/watch?v=BIeTVSyGOQ8

result: OK

4. My graphs with Symbol 12, symbol size 2
https://www.youtube.com/watch?v=P4H0aTxEv34

result: not OK

This (symbol 12) on my graphs even caused that with combination of the
recording software when it was running, main window of my program
appeared for a while over the graphics window (as you can notice when watching the video), which should not. This was not the case with the symbol 10 on my graphs.

NOTE: When pressing my ZOOM TO EXTENTS (Celý rozsah) button, it takes a few seconds to complete the task (since it deals with cloud of points (about 134 500 points)).

I will try both programs on different PC.

But at the moment, I will use SYMBOL=10 with SYMBOL_SIZE=2, since it
runs smoothly!

Martin
Back to top
View user's profile Send private message
Martin_K



Joined: 09 Apr 2020
Posts: 227

PostPosted: Thu Jun 25, 2020 8:56 am    Post subject: Reply with quote

system information:

I have Windows 10 Pro, Version 1909, with all updates applied.
Back to top
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 697
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Thu Jun 25, 2020 12:52 pm    Post subject: Reply with quote

So for the example code:
Symbol 12 plus windows 10 plus latest DLLs and MOD files on my machine work.
But
Symbol 12 plus windows 10 don’t work on your machine. Are you 100% sure you have the latest/correct DLLs and MOD files on your machine?


Last edited by Kenneth_Smith on Thu Jun 25, 2020 6:15 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Martin_K



Joined: 09 Apr 2020
Posts: 227

PostPosted: Thu Jun 25, 2020 3:56 pm    Post subject: Reply with quote

Thanks for your tip Ken!

I found the problem!

I downloaded again the new DLLs + MOD, INS files from
your post of June 22, 10:35pm and compared the files
with the ones I used till now.

I found an older MOD file in the corresponding folder
when comparing to the MOD file from your download.

Now it works also with symbol 12!

Martin
Back to top
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 697
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Thu Jun 25, 2020 6:19 pm    Post subject: Reply with quote

Excellent.

Looking at your videos, there is a significant delay in some cases between the button being pushed and the graph being refreshed. You might want to add something like this to the call backs that take a while to refresh the screen.

Code:
module demo
use clrwin
integer control_temp_win       ! Control variable for temp window
contains

  integer function do_long_calc()
    integer i
    print*, 'Beginning long calc'
    i = temp_window()
!   Do some long calc - here just sleep for 10 s

    call sleep1@(10.d0)

    print*, 'Completed long calc'
   
!   All done, close temp_window, by setting control_temp_win = 0 and calling window_update@(control_temp_win)
    control_temp_win = 0
    call window_update@(control_temp_win)
    do_long_calc = 1
  end function do_long_calc


  integer function temp_window()
  integer, save :: iw
    iw = winio@('%ww[no_caption,no_maxminbox,topmost]&')
    iw = winio@('%fn[Tahoma]&')
    iw = winio@('%ts&',1.2d0)
    iw = winio@('%bg[grey]&')
    iw = winio@('%ws&','Processing')
    iw = winio@('%nl%ws&','Please wait')
    iw = winio@('%lw&', control_temp_win)       ! This automatically sets control_temp_win to -1
    iw = winio@(' ')
    temp_window = 2
  end function temp_window

end module

program main
use demo
  i = do_long_calc()
end program main
Back to top
View user's profile Send private message Visit poster's website
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Thu Jun 25, 2020 6:53 pm    Post subject: Reply with quote

Martin, you wrote:
Quote:
But at the moment, I will use SYMBOL=10 with SYMBOL_SIZE=2, since it
runs smoothly!


but in the video at 21 secs and at 30secs, the plots seem to be part missing (along the top at 21 secs and on the right at 30secs.
Is that intentional ?

(in RED above - edits(corrections) 27_06_2020 following query below)
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "


Last edited by John-Silver on Sat Jun 27, 2020 6:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
Martin_K



Joined: 09 Apr 2020
Posts: 227

PostPosted: Fri Jun 26, 2020 6:09 pm    Post subject: Reply with quote

John,

I was on a business trip today and currently travelling back.
During my pause in travelling - just quick answer/question to you.

I do not understand what do you mean under: ...to be part lissing...
What do you mean?

I will incorporate Ken´s suggestion as soon
as I have little bit more time (maybe you also pointed to the fact that re-drawing of graphs with about 135000 points takes a while, whereas it can seem to the operator that program does nothing).

Martin
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Sat Jun 27, 2020 6:07 pm    Post subject: Reply with quote

Martin, sorry I've clarified in my comment above, I meant 'missing' - when I run the YT video part of the graph shows as blank at each moment mentioned

No, I noticed the delay, just try pausing exactly at 21secs and 30secs
I can do screen grabs if you need me to
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 697
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Sun Jun 28, 2020 1:25 pm    Post subject: Reply with quote

John’s comments remined me that with the new DLLs is should be possible to add scroll bars to the native %pl. Does anybody have a simple example they could share to demonstrate this in practice?

Ken
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sun Jun 28, 2020 4:21 pm    Post subject: Reply with quote

Code:
      module mymod
        use clrwin
        implicit none
        integer pos,range
        real(2) y_min0,y_max0
      contains
        integer function cb()
          integer iyoffset
          character(32) reason
          reason = clearwin_string@("CALLBACK_REASON")
          if(reason == "VSCROLL")then
            iyoffset = pos*range;
            call change_plot_dbl@(0, 'y_min', 0, y_min0 + iyoffset/1000d0)
            call change_plot_dbl@(0, 'y_max', 0, y_max0 + iyoffset/1000d0)
            call simpleplot_redraw@()
          endif 
          cb = 2
        end function
      end module
       
      WINAPP
      program main
      use mymod
      implicit none
      INTEGER N,i,page,iw
      INTEGER(7) hTitleFont
      PARAMETER(N=11)
      REAL*8 x(N),y(N)
      DO i=1,N
        x(i)=0.1d0*(i-1)
        y(i)=x(i)*x(i)
      ENDDO
      y_min0 = 0.0d0
      y_max0 = 1.0d0
      pos = 0
      page = 50
      range = 100
      i=winio@('%ca[Quadratic]%pv&')
      CALL winop@("%pl[title=Graph]") !graph title
      CALL winop@("%pl[width=2]")     !pen width
      CALL winop@("%pl[x_array]")     !x data is provided as an array
      CALL winop@("%pl[link=curves]") !join data points with curves
      CALL winop@("%pl[symbol=9]")    !mark data points with filled rhombuses
      CALL winop@("%pl[colour=red]")  !pen colour
      CALL winop@("%pl[pen_style=2]") !2=PS_DOT
      CALL winop@("%pl[tick_len=6]")
      CALL winop@("%pl[frame]")
      CALL winop@("%pl[y_sigfigs=2]")
      CALL winop_flt@("%pl[x_max]", 1.0d0)
      CALL winop_flt@("%pl[y_max]", 1.0d0)
      i=winio@('%fn[Verdana]%ts[1.2]%it%gf%sf&',hTitleFont)
      CALL winop_hdl@("%pl[title_hfont]",hTitleFont)
      iw = winio@("%vx&", page, range, pos)
      i=winio@('%^pl[vscroll]&',400,250,N,x,y,cb)
      i=winio@('%sf%ff%nl%cn%tt[OK]')
      END

Back to top
View user's profile Send private message AIM Address
Martin_K



Joined: 09 Apr 2020
Posts: 227

PostPosted: Sun Jun 28, 2020 10:37 pm    Post subject: Reply with quote

Ken,

Today, I implemented your suggestion regarding to significant delay (in some cases) between the pushing a button and subsequent re-drawing the graphics - many thanks, now it works!

However - I lost nearly 2 hours with this simple task! I was already totally frustrated, since it did not work with my code.
I did not know further what I should do, so as last desperate attempt, I changed the graphical representation of the grid points from symbol 12 to symbol 10.

After this change, it worked IMMEDIATELY problem free with symbol 10!

Please - could you try the procedure with symbol 12 (and then, for example. with symbol 10), whether it will work with the symbol 12
or not and confirm my knowledge or negate it? In any case, when I pick symbol 12, I always have some big issues!

Thanks in advance!

Martin

P.S. I have the latest DLLs, MOD, INS and FTN95.EXE (v8.63) of June 22, 2020.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 5 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group