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, ... 18, 19, 20  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
John-Silver



Joined: 30 Jul 2013
Posts: 631

PostPosted: Sat Apr 29, 2017 6:23 pm    Post subject: Reply with quote

Indeed a good link, thanks Ken.

Dan - what log example are you referring to, I don't see anything obvious on that page.
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Sat Apr 29, 2017 7:30 pm    Post subject: Reply with quote

John, I may miss something with my blurry end of the week look: see the first LOG example with the absurd step distance 1.585? It should be XMINP=1 to XMAXP=200 with N=2 as usual

Also last one is also bad. It should plot tic axis marks from 0.1 to 2000 and numbering only large tic marks at exact decades 0.1, 1, 10, 100, 1000.

Middle example is kind of OK but N must be 3 not 2: 0.1, 1, 10

Code:

        XMIN      XMAX   N        XMINP      XMAXP          DIST
 
        1.8      125.0  10        1.585      158.489        1.585
        0.1       10.0   2        0.100       10.000       10.000
        0.1     1500.0   4        0.077     2154.436       12.915

https://people.sc.fsu.edu/~jburkardt/f77_src/toms463/toms463_prb_output.txt

Current native %pl is clearly better with the LOG scale


Last edited by DanRRight on Mon May 01, 2017 9:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
Kenneth_Smith



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

PostPosted: Mon May 01, 2017 1:55 pm    Post subject: Reply with quote

I have noticed that if the range of the y values to be plotted is less than 0.1 %pl plots nothing. Not a problem in itself as obviously one can rescale the signal and change the axis label accordingly but this does complicate the code immediately before the call to %pl. It would be better if %pl plotted something, even if the scales turned out to be a bit odd - simply a value/tick at the minimum and maximum values would be sufficient and much better than a blank window.

The following code illustrates the issue.

Ken

Code:
program sine_wave_test
implicit none
include<windows.ins>
real(kind=2) wt(1:361), sig(1:361), pi, max, min, dy
real(kind=2) k
integer i, j

pi=4.d0*atan(1.d0)

do i = 1, 361, 1
  wt(i)  = (pi/180.d0)*real(i-1,kind=2)
end do

!Test sine wave
k=0.1d0
do i = 1,10,1
  sig = k*sin(wt)
  max = maxval(sig)
  min = minval(sig)
  dy  = max - min
  j = winio@('%ww&')
  j = winio@('%pl[native,x_array,link=lines,n_graphs=1,framed]&',400,300,361,wt,sig)
  j = winio@('%ws&','max=')
  j = winio@('%`rf&',max)
  j = winio@('%ws&','min=')
  j = winio@('%`rf&',min)
  j = winio@('%ws&','dy=')
  j = winio@('%`rf&',dy)
  j = winio@('%ff%cn%bt[Continue]')
  k = k - 0.01d0
end do

!Test rectified sine wave
k=0.5d0
do i = 1,20,1
  sig = abs(k*sin(wt))
  max = maxval(sig)
  min = minval(sig)
  dy  = max - min
  j = winio@('%ww&')
  j = winio@('%pl[native,x_array,link=lines,n_graphs=1,framed]&',400,300,361,wt,sig)
  j = winio@('%ws&','max=')
  j = winio@('%`rf&',max)
  j = winio@('%ws&','min=')
  j = winio@('%`rf&',min)
  j = winio@('%ws&','dy=')
  j = winio@('%`rf&',dy)
  j = winio@('%ff%cn%bt[Continue]')
  k = k - 0.05d0
end do

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


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

PostPosted: Mon May 01, 2017 2:32 pm    Post subject: Reply with quote

Ken

This limitation has now been removed for the next release.
Back to top
View user's profile Send private message
Kenneth_Smith



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

PostPosted: Mon May 01, 2017 7:13 pm    Post subject: Reply with quote

Thanks Paul,

What's the timescales for the next release, days, weeks or months? I ask as I've hit this issue many times since I started using the new %pl. It's not really per-unit friendly - that's the way electrical engineers do network calculations which tends to produce small delta values, where for example a 2% voltage drop is plotted as a departure of -0.02 from the reference value of 1.00
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Mon May 01, 2017 9:17 pm    Post subject: Reply with quote

I could upload a new set of DLLs tomorrow but that wouild be before I have fixed one or two things for Dan.
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Tue May 02, 2017 12:00 am    Post subject: Reply with quote

Three and we are mostly done Smile

1) The vertical and horizontal error bars i was talking about (they could also look like symbols) are these crosses. They are very often used and show the interval of the possible plotted values

Noticed nice font in this plot? Can anyone reproduce it?

I do not ask for the nice looking captions like in this plot which would be separate journey for the future updates. This could be not easy like 2x2 feature to implement.

2) Easy stuff: please allow larger range for the length of tic marks then 10 pixels. Good journals require very high resolution of the plots so we increase the pictures on 4k monitors almost to the end and 10 pixel long tics look too small. In LOG scale minor tic marks have to be 50-70% of the major tic marks

3) i am running out of further wishes Smile
Back to top
View user's profile Send private message
Kenneth_Smith



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

PostPosted: Tue May 02, 2017 6:09 am    Post subject: Reply with quote

Paul,

It would be very much appreciated if you could make a new dll available.

Thanks Ken
Back to top
View user's profile Send private message Visit poster's website
John-Silver



Joined: 30 Jul 2013
Posts: 631

PostPosted: Tue May 02, 2017 9:52 am    Post subject: Reply with quote

Dan, do you mean 'what's the name of this font ?' ?
The font foes look good.

Ths captions (I assume you mean axes labels AND legend ?) are possible becasue you can write direct to the %gr with DRAW_CHARACTERS@ , providing of course you know the location to write to (inside the graphic area is straight forward (by getting the pixl co-ords of point (7,70) for example and starting there. It does add to the complexity of the programming though.
However the problem I see in general is that you have to know that there is blank space in that part of the plotting zone.
In the general case you don't know the values or which part is 'free' for legends, or in this case the title located inside the plot box too.
Again, these are of course considerations for future development.

As for tic marks, is there actually the possibility at the moment of seperately defined secondary tick marks ?
If not it might not be as esy as you imply to implement varying tic lengths (and thicknesses !).
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Tue May 02, 2017 10:41 am    Post subject: Reply with quote

As to the fonts, yes, there are 300+ fonts in the computer and none looks nice like this one. Or the one in Sample Linear above, that is totally godlike font (I might be wrong, though I tried most of them).

Tic length change already are done by Paul, but not the minor ones in LOG scale (I might be wrong again) and not longer then 10 pixels (needs to be 20 at least). And impression was that in LOG scale minor tic marks (those between decades, like 2,3,4... between 1 and 10) are not changing together with major ones marking decades (1, 10, 100 etc). That requires really minor changes of existing settings.

Minor tic mark implementation and sizes for linear scale is a different story, here you are right.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue May 02, 2017 2:59 pm    Post subject: Reply with quote

Here is a new set of DLLs. Don't forget to create a backup before installing.

https://www.dropbox.com/s/6vvct0hsnwmgcxl/newDLLs8.zip?dl=0
Back to top
View user's profile Send private message
Kenneth_Smith



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

PostPosted: Tue May 02, 2017 4:56 pm    Post subject: Reply with quote

Thanks for your efforts Paul.

Regards

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



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

PostPosted: Tue May 02, 2017 7:12 pm    Post subject: Reply with quote

Passed my test with slightly made up numbers.

Thanks again.

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



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

PostPosted: Thu May 04, 2017 7:41 am    Post subject: Reply with quote

OK, finally good news, as of today the options of new PL allowed it to beat not only Simpleplot but the Matlab and OriginLab in visual quality of image in linear plotting. Excusing couple small grains of salt here is what new %pl shows. Compare and tell which one is better, OriginLab or Silverfrost?



Now we can adjust all border sizes, the line widths and axis widths, positions of the titles and quality of smoothing. The x_min, x_max, y_min, y_max work in linear and LOG scale well. Specifically great is LOG handling of zero and negative numbers with convenient popup menu etc

So we are 99% close to be the best universal plotting routine in Fortran, congrats to Silverfrost

About LOG scale plotting will be next message as well as what is left to update and fix
Back to top
View user's profile Send private message
Kenneth_Smith



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

PostPosted: Thu May 04, 2017 1:42 pm    Post subject: Reply with quote

Paul, I am reticent to post this as you are probably a bit fed up of our collective comments by now.
A useful possible addition would be a flag which forces %pl to place the scales external to the frame, this would avoid the situation where data points obscure the numbers on the scale, and would give a more uniform appearance when groups of plots a combined together. The group of plots shown in the example below would look so much better if this was possible.


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, ... 18, 19, 20  Next
Page 2 of 20

 
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