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 

Native %pl
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
DanRRight



Joined: 10 Mar 2008
Posts: 1476
Location: South Pole, Antarctica

PostPosted: Thu Jun 08, 2017 9:49 am    Post subject: Reply with quote

John, Here is the link on my Microsoft Onedrive open account, file IdealPL.zip has data, sources and examples made in OriginLab for visual comparison with professional scientific graphics software

Code:
https://1drv.ms/u/s!Ao024Ta1-aVRhylqx47UY5Sx6W0p


Other demos are also open for everyone (excluding EXE file and PS_problem were for my own use)
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 495

PostPosted: Fri Jun 09, 2017 8:34 am    Post subject: Reply with quote

thanks Dan.

Well running the code of 21st April post (which is same Ithink as the code in your zip file) with DLLs8 I have no problem with compilation (which you did with dlls7), and the Y scale looks fine with integer values plotted on the scale.
X-scale title is still right-justified.

I did however have to delete the code of the first %ww (with the 'original' plot) because it went off the bottom of my screen and no way to view it !
Even re-sizing by hand didn't help because no scroll bars.
I'm confused as to why, I was actually expecting 2 seperate windows. Why does it produce everything in one window (all in the second one: 'Default Window' ) ?
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1476
Location: South Pole, Antarctica

PostPosted: Fri Jun 09, 2017 4:02 pm    Post subject: Reply with quote

John,
You can rearrange these two windows from stacking vertical to horizontal position adding just a pair of %ob/%cb for these two lines

Code:

      i=winio@('%ww[no_border]%ob&')
      i=winio@('%gr[BLACK]%ff%cb%lw&',660, 550, ilw)


Vertical window positioning was taken because i used large resolution 3840x2160 (4k TV as a PC monitor).

/** which i also recommend to everyone - this is way cheaper and infinitely better than any non-4k real PC large monitors in the world. Latter one because there are no PC monitors of size ~50" but this is exactly the minimum size all monitors have to have. As the owner of many top notch monitors in the past (i hated some of them despite their sometimes $3-4K price tags) i will assure that you will be stunned both with the improved quality of work and entertainment. Also, before, couple years back, only NVIDIA 900 series videocards worked with 4K monitors via HDMI ports, but today probably all work (the only condition for good text rendering is that the monitor has to support 60Hz at 4:4:4 chroma simultaneously. And if your kids play games on it then it has to have also small input lag ~25ms or less in game mode. There such good chroma bandwidth is rarely needed. Consumption is by the way only 72W in my case of 50", less then for 2-3x smaller CRT monitors).
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 495

PostPosted: Wed Jun 21, 2017 8:08 am    Post subject: Reply with quote

finally got back onto the benchmarking on my machine.
thanks for the file Dan and the mod to get everything on my screen.

I don't see all the problems you commented on on 8th May.

Re-sizing doesn't do strange things with axes scales.

I did notice one small thing which hasn't been mentioned before -
the very first label on x-axis scale is not centre justified over tick -axis tick mark, it looks like it's left justified against the left extreme of the y axis tick mark just above it.
A small and subtle discrepancy.

This is presumeably to avoid clashing of the x-axis and y-axis lbels when they both exist ?

The curves still plot out of the graphic area.
To note here, playing around with an Excel plot (chart), they too extend beyond the borders of the graphic frame but only marginally. Just enough to indicate that the curves go out of bounds but nothing drastic like we have in ftn95 at the moment
.[/img]


Last edited by John-Silver on Wed Jun 21, 2017 8:42 am; edited 1 time in total
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 495

PostPosted: Wed Jun 21, 2017 8:26 am    Post subject: Reply with quote

I turned my attention, as another benchmark) to the example programs in the documentation:
http://silverfrost.com/ftn95-help/clearwinp/simplepl/native.aspx

The first one runs fine, however the second one, namely:


Code:
      WINAPP
      MODULE mydata
        USE clrwin
        ENUM,BIND(C)
         ENUMERATOR::link_none=0,link_lines,link_curves !values 0,1,2
         ENUMERATOR::all_graphs=0,graph1                !values 0,1
        END ENUM
        INTEGER,PARAMETER::n=1000
        LOGICAL shown
        DOUBLE PRECISION y(n)
      CONTAINS
      INTEGER FUNCTION show()
        INTEGER errstate
        errstate = change_plot_int@(0,"link",graph1,link_curves)
        if(errstate /= 0) print*, clearwin_string@("ERROR_REPORT")
        errstate = change_plot_int@(0,"colour",graph1,RGB@(255,0,0))
        errstate = change_plot_dbl@(0,"y_max",all_graphs,1.5d0)
        shown = .true.
        CALL simpleplot_redraw@()
        show = 2
      END FUNCTION show
      INTEGER FUNCTION clear()
        INTEGER errstate
        errstate = change_plot_int@(0,"link",graph1,link_none)
        shown = .false.
        CALL simpleplot_redraw@()
        clear = 2
      END FUNCTION clear
      INTEGER FUNCTION legend()
        IF(shown) THEN
          CALL draw_characters@("Legend:..", 300, 100, 0)
          CALL draw_line_between@(300,120,360,120,RGB@(0,0,255))
        ENDIF
        legend = 2
      END FUNCTION legend
      END MODULE mydata
     
      PROGRAM main
      USE mydata
      INTEGER i,x
      DOUBLE PRECISION p1,p2,p3
      p1=1.5d0
      p2=150.0d0
      p3=15d0
      x=0
      DO i=1,n
        y(i)=p1*sin(x/p3)*exp(-x/p2)
        x=x+1
      ENDDO
      shown = .false.
      i=winio@('%ww[no_border]%ca[Damped wave]%pv&')
      i=winio@('%mn[Edit[Show, Clear]]&', show, clear)
      i=winio@('%fn[Tahoma]&')
      i=winio@('%ts&', 1.1d0)
      i=winio@('%tc&',rgb@(0,0,80))
      i=winio@('%it&')
      i=winio@('%`bg&',rgb@(230,255,225))
      CALL winop@("%pl[native]")
      CALL winop@('%pl[title="Sample plot"]')
      CALL winop@("%pl[x_axis=Time(Milliseconds)]")
      CALL winop@("%pl[y_axis=Amplitude@(-4.0)]")
      CALL winop@("%pl[smoothing=4]") ! anti-aliasing
      CALL winop@("%pl[link=none]")   ! delay drawing
      i=winio@("%^pl",500,400,n,0.0d0,1.0d0,y,legend)
      END


won't run for some reason.
I'm running as 32bit
I get this message:


with details as follows:


I then tried running it as 64bit and got this message during SLINK64 :-
Quote:
[SLINK64 v1.8, Copyright (c) Silverfrost Ltd. 2015-2017]
***Command file terminated unexpectedly - use a file command to save the load.


Any ideas why this is not running ?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Jun 21, 2017 10:21 am    Post subject: Reply with quote

The 64 bit case runs OK for me. I will take a look at the 32 bit case.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1476
Location: South Pole, Antarctica

PostPosted: Wed Jun 21, 2017 11:00 pm    Post subject: Reply with quote

John,
1) What are your screen dimensions? You may not see all these problems if you resize the plot but the screen size is not large enough

2) The Silverfrost demo code you posted crashes in 32bit case too.
The 64 run OK

BTW, from my quick look : what is ENUMERATOR and the code with it for?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Jun 22, 2017 9:02 am    Post subject: Reply with quote

John

I have not looked at this yet but I think that Dan has highlighted the problem...
The new ENUM feature is not working in this program for 32 bits. Try using PARAMETER instead.
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 495

PostPosted: Sat Jun 24, 2017 8:36 am    Post subject: Reply with quote

in the error message for my SLINK64 above, what does ...
Quote:
use a file command to save the load.

mean ?
... and what's the 'command file' which is referred to ?
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 495

PostPosted: Sat Jun 24, 2017 8:49 am    Post subject: Reply with quote

I also havee the same quažestion as Dan, 'what does this ENUMERATOR code do ?'
... and that might clify to me what you mean by 'replace it with PARAMETER' (or maybe it won't ! , at the moment I have no idea what you mean)
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Jun 24, 2017 11:18 am    Post subject: Reply with quote

John

I don't reognise the error report and I don't have access to a PC at the moment.

For the code
Code:
ENUM,BIND(C)
         ENUMERATOR::link_none=0,link_lines,link_curves !values 0,1,2
         ENUMERATOR::all_graphs=0,graph1                !values 0,1
        END ENUM


use
Code:
INTEGER,PARAMETER::link_none=0
INTEGER,PARAMETER::link_lines=1
INTEGER,PARAMETER::link_curves=2


etc. ENUMERATOR simply provides automatic numbering of integer values.
Back to top
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 81
Location: Glasgow, Scotland.

PostPosted: Mon Jun 26, 2017 3:45 pm    Post subject: Reply with quote

Paul,

I curious to know if you have been able to make any progress with the suggestions I made back at the beginning of May?

Thanks

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


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

PostPosted: Mon Jun 26, 2017 7:00 pm    Post subject: Reply with quote

Ken

I haven't done any work on this for a while. I am hoping to review this thread an make some final adjustments some time before the next full release.
Back to top
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 81
Location: Glasgow, Scotland.

PostPosted: Mon Jun 26, 2017 10:06 pm    Post subject: Reply with quote

Thanks Paul. I found myself looking at the native %pl again today after 6 weeks doing other things and rediscovering some of the minor issues for a second time - my memory is not as good as it used to be - hence the question.
Ken
Back to top
View user's profile Send private message Visit poster's website
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
Page 4 of 4

 
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