View previous topic :: View next topic |
Author |
Message |
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 |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 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: 2923 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: 8210 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: 8210 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: 8210 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 |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Wed Oct 26, 2016 4:24 am Post subject: |
|
|
John,
How about "New Quick XY Plot Facility %pl" ? |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Wed Oct 26, 2016 11:11 am Post subject: |
|
|
Agustin
The concept of allowing n=0 has been implemented and also the pen styles PS_SOLID etc.. I will upload a new set of DLLs when a different issue has been resolved. |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Wed Oct 26, 2016 1:09 pm Post subject: |
|
|
Paul,
Even though I don't use Simpleplot myself, may I express gratitude that you have updated it? I know you used your usual device of saying nothing until you produced the finished product, but regulars on the Forum know that is your style! %pl is a potentially strong selling point of Clearwin+
I also welcome the idea that a %pl window can be created without data. It is a windows norm that users create windows with various parts deactivated rather than have them changing windows layouts on the fly, so the n=0 option fits with that paradigm.
Similarly, when you made data input windows turn into write only when %il limits were the same. Such refinements make Clearwin+ conform more closely to the way the majority of Windows applications work.
I'm assuming that the new %pl works in both 32 and 64 bit mode.
Eddie |
|
Back to top |
|
 |
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Wed Oct 26, 2016 1:09 pm Post subject: |
|
|
yes, you are right...and I am in a similar situation you mention....that's why I asked for more curve styles and symbols, but considering the work Paul is having these days with the compiler, I understand that he cannot deviates too much from the timetable Siverfrost has with the 64 compiler. With the 64 compiler Simpleplot is definitively dead, so any improvement with Clearwin plot facilities is more than welcome. The possibility of using %pl from the very beginning of the run where no data is available yet for plotting is, at least for me, a first step in such direction.
P.S. this was a replay to John's comment about "... unless you work in an office which limits the use of colour printing :O) !!! "....... |
|
Back to top |
|
 |
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Wed Oct 26, 2016 3:20 pm Post subject: Re: |
|
|
DanRRight wrote: | John,
How about "New Quick XY Plot Facility %pl" ? |
I agree with you.....this subject has nothing to do with "fortran modernisation workshop", so I support the idea to move the next comments or replays about the new %pl implementation to a new "Topic"
Agustin |
|
Back to top |
|
 |
|