|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Sat Oct 22, 2016 8:04 am Post subject: |
|
|
The current release (v8.05) of the compiler comes with a beta release of our 64 bit debugger SDBG64. Compile with /debug and run "SDBG.exe prog.exe".
A beta version of a native %pl is now available for testing by using the following link to download new DLLs. Please use with caution and make sure that the existing DLLs are backed up before installing. A text file in the download provides notes on how to use the native %pl.
https://www.dropbox.com/s/2p4n4bjt8bfo7tv/newDlls10.zip?dl=0
Here is an illustrative sample program:
Code: | WINAPP
INCLUDE <clearwin.ins>
C_EXTERNAL WINOP@ '__winop'(INSTRING) !Remove this line for a new clearwin.ins
INTEGER i,x
INTEGER,PARAMETER::n=1000
DOUBLE PRECISION p1,p2,p3,y(n)
INTEGER,EXTERNAL::cb
!read*,i
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
i=winio@('%ww[no_border]%ca[Damped wave]%pv&')
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[width=2]")
call winop@('%pl[title="Sample plot"]')
call winop@("%pl[x_axis=Time(Milliseconds)]")
call winop@("%pl[y_axis=Amplitude@(-4.0)]")
call winop@("%pl[style=2]") ! curve joins points
call winop@("%pl[smoothing=4]") ! anti-aliasing
i=winio@("%^pl[colour=red]",500,400,n,0.0d0,1.0d0,y,cb)
END
INTEGER FUNCTION cb()
INCLUDE <clearwin.ins>
call draw_characters@("Legend:..", 300, 100, 0)
call draw_line_between@(300,120,360,120,rgb@(0,0,255))
cb = 0
END
|
|
|
Back to top |
|
|
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Mon Oct 24, 2016 1:12 am Post subject: |
|
|
Paul,
the new %pl format seems quite interesting.I have tested it and works fine, and I liked it, although I wonder how to use it to replace the old %dw. In my case, I am still using Simpleplot via:
width=0.8*clearwin_info@('SCREEN_WIDTH')
height=0.8*clearwin_info@('SCREEN_DEPTH')
ans=winio@('%bg[grey]%ww[maximise]%^dw[user_resize]&',width,height,bitmap) ! Pass bitmapDC to ClearWin
so I can reserve a region for plots and create menus and buttons around it. With %pl I feel a little lost, becauseseems it asks always data for plotting, so if I use it I get a "second" window once the plots are calculated. Or am I forgetting anything?. As far as I remember, in the past it was possible to define something like "i=winio@('%pl[user_drawn]&',400,300)", and use a call-back to plot something or leave the corresponding place empty, but now this option is no more there.
I have some other comments about the new %pl format, but I prefer to have an answer to this first question before advancing....
Agustin |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Mon Oct 24, 2016 7:24 am Post subject: |
|
|
At last ! some progress re- all the nagging from myself and Dan, although it would have been nice to have known this was going on behind the scenes (I know, no pleasing some people) as I for one haven't seen any input from Sfrost previously in response to our incessant prodding in this direction !
One obvious comment is THIS INFO HERE IS GOING TO GET LOST !
A seperate post - or better still a seperate Forum TOPIC ? would app�ear prudent. Also as an i�nput for user suggestions as it grows in capabilities maybe.
Not to mention the people who haven't even bothered to read up on this post (which was about the Fortran Modernisation symposium !). I know I for one almost read past it, then almost didn't read all the updated comments as I was befuddled by the optimisation story, and so nearly missed the good news !
Isn't 'Announcements' intended for this sort of stuff ?
Last edited by John-Silver on Mon Oct 24, 2016 7:37 am; edited 1 time in total |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Mon Oct 24, 2016 7:29 am Post subject: |
|
|
Agustin, it says in the help file in the dlls .zip that it acts like a %gr
Therefore should be no problem treating it as such and plonking all the other controls around it as you wish.
It also mentions an IDentifier, although it's not mentioned there (yet) the format for speciying that, not that I noted anyway !
And a callback can be specified, and the plot can be overwritten wth User-defined graphics (like custom-axis subtitles) - a nice option.
Not sure though how Dan will cope with the nice option for label positioning tweaking when re-sizing a window ! |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Mon Oct 24, 2016 7:34 am Post subject: |
|
|
Maybe a GOOD POINT HERE FOR SILVERFROST TO SET UP THE NEW FORUM TOPIC !!!! (see my suggstion 2 up)
(x-referencing this post of course !) |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Mon Oct 24, 2016 7:54 am Post subject: |
|
|
%dw was the original graphics control that was developed into %gr. So %gr replaces %dw.
The native %pl shares a "drawing surface" with %gr which means that you can use %gr routines to draw directly to a native graph.
The %pl identifier is described in the original documentation for %pl. The native %pl replicates all of the original %pl syntax apart from for the user_drawn option. For further details see the notes that are included in the download. |
|
Back to top |
|
|
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Mon Oct 24, 2016 6:36 pm Post subject: |
|
|
I'm sorry, but I'm lost: %pl requires always a pair of x/y values, so I cannot create a %pl window without plotting something....I find no way to create, like %gr, an empty window where I show initially the place for the coming plots (like I did with %gr and %dw, i.e., something like just: winio@('%pl[options]', width, height). On the other hand, if I initially plot something with a first call to %pl, when I have a second call to %pl (because I have a new plot), %pl opens in a second window.
Agustin |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Tue Oct 25, 2016 1:26 am Post subject: |
|
|
Uff ...i already thought %pl will never be revived from the oblivion ! Great start and changes are in the right direction. Fonts look nice, and in right places with tic marks. It is also possible to plot symbols instead of lines and the whole ideology is more aligned with the whole Clearwin+.
Please do not forget my easy to implement suggestions on how to make it to produce top notch quality plots so that in one of our next Nature or Science paper i will make a caption "Plotted using Silverfrost Clearwin+"
One obvious bug is in this demo: when you scale the plot size to zero with mouse it crashes with FP overflow error.
I also tried for first time 64bit debugger on this exactly example but it did not go... |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Tue Oct 25, 2016 6:50 am Post subject: |
|
|
aebolzan
%pl is only for plotting 2D graphs otherwise use %gr. |
|
Back to top |
|
|
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Tue Oct 25, 2016 2:10 pm Post subject: |
|
|
I know that, what I am saying is that you cannot have a blank %pl window when a program starts, as it can be done with %dw and %gr, therefore it cannot be used when you have a program that first makes some calculations and then plots the resulting data, within the same and single window. If you use %pl during the run of the program, %pl opens in a second window. I do not know if I am clear on this point, am I?.....the new facility of %pl is quite interesting, but limited in this respect, unless I am missing something....
Agustin |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Tue Oct 25, 2016 5:11 pm Post subject: |
|
|
OK. Could you do that with the old %pl?
Perhaps, if ClearWin+ was to process the number of points n as a reference then the user could set it to zero initially and trigger a redraw with a non-zero value later.
At the moment the native %pl fails if n is zero but it might a relatively simple feature to add. |
|
Back to top |
|
|
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Tue Oct 25, 2016 7:17 pm Post subject: |
|
|
Paul,
I have to admit that it was also not possible with the old non-native %pl, but I thought that the new implementation had overcome such limitation. I think that it would be very useful to have the option of no-plot by setting n=0 as you mention.
By the way: I do not know how difficult could be to implement also at least three types of styles for curves (full, dot, dash) and different types of symbols (square, circle, triangle, both as empty and full symbols). Such styles would make quite versatile the use of %pl for 2D plots.....
Sorry if I am asking too much.....
Agustin |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Tue Oct 25, 2016 9:15 pm Post subject: |
|
|
Agustin
I will look at the n=0 feature. The other things should be simple to implement but the best I can do for now is to put them on the wish list. |
|
Back to top |
|
|
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Tue Oct 25, 2016 11:41 pm Post subject: |
|
|
Thanks Paul, that would be a good start, for the rest...well.....we can wait and in the meantime we can use colours to plot different sets of data-curves....
Agustin |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Wed Oct 26, 2016 3:48 am Post subject: |
|
|
... unless you work in an office which limits the use of colour printing :O) !!!
... and/or b&w photocopies of colour originals are oft used !!! |
|
Back to top |
|
|
|
|
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
|