forums.silverfrost.com
Welcome to the Silverfrost forums

 Native %pl Goto page Previous  1, 2, 3, ... 24, 25, 26  Next
Author Message
John-Silver

Joined: 30 Jul 2013
Posts: 847

 Posted: Sat Apr 29, 2017 6:23 pm    Post subject: Indeed a good link, thanks Ken. Dan - what log example are you referring to, I don't see anything obvious on that page.
DanRRight

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

Posted: Sat Apr 29, 2017 7:30 pm    Post subject:

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
Kenneth_Smith

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

Posted: Mon May 01, 2017 1:55 pm    Post subject:

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 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
PaulLaidler

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

 Posted: Mon May 01, 2017 2:32 pm    Post subject: Ken This limitation has now been removed for the next release.
Kenneth_Smith

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

 Posted: Mon May 01, 2017 7:13 pm    Post subject: 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
PaulLaidler

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

 Posted: Mon May 01, 2017 9:17 pm    Post subject: I could upload a new set of DLLs tomorrow but that wouild be before I have fixed one or two things for Dan.
DanRRight

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

 Posted: Tue May 02, 2017 12:00 am    Post subject: Three and we are mostly done 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
Kenneth_Smith

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

 Posted: Tue May 02, 2017 6:09 am    Post subject: Paul, It would be very much appreciated if you could make a new dll available. Thanks Ken
John-Silver

Joined: 30 Jul 2013
Posts: 847

 Posted: Tue May 02, 2017 9:52 am    Post subject: 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 !).
DanRRight

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

 Posted: Tue May 02, 2017 10:41 am    Post subject: 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.
PaulLaidler

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

 Posted: Tue May 02, 2017 2:59 pm    Post subject: 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
Kenneth_Smith

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

 Posted: Tue May 02, 2017 4:56 pm    Post subject: Thanks for your efforts Paul. Regards Ken
Kenneth_Smith

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

 Posted: Tue May 02, 2017 7:12 pm    Post subject: Passed my test with slightly made up numbers. Thanks again.
DanRRight

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

 Posted: Thu May 04, 2017 7:41 am    Post subject: 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
Kenneth_Smith

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

 Posted: Thu May 04, 2017 1:42 pm    Post subject: 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.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT + 1 HourGoto page Previous  1, 2, 3, ... 24, 25, 26  Next Page 2 of 26