|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Wed Mar 22, 2017 9:58 am Post subject: |
|
|
doh why is the blindingly obvious sometimes so difficult to see? Thanks for your perseverance Paul. |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Wed Mar 22, 2017 10:59 pm Post subject: |
|
|
It's taken three weeks, but I got there. Thanks for all your help folks.
Regards
Ken |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Thu Mar 23, 2017 1:29 am Post subject: |
|
|
Thank you Paul for confirming the re-introduction of logarithmic scales.
I assume it's still necessary to input the values already converted ?
Is there any additional things we should know about that implementation (there was no specific documentation in the on-line help - obviously becasue it wasn't included in v8.10) and the last dlls file released on the 'main Native %pl post' was 'dlls17' and it's not still available to see if there was anything in there about log scaling therein.
Thanks. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Thu Mar 23, 2017 1:34 am Post subject: m.memegen.com/80rslu.jpg |
|
|
Ken, well done ! .....
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Thu Mar 23, 2017 7:51 am Post subject: |
|
|
John
The logarithmic values don't need to be converted beforehand.
Given this and the extra options in the readme, the only documentation that is needed can be found in the latest ftn95.chm at ClearWin+->SIMPLEPLOT->Native graph plotting. |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Thu Mar 23, 2017 10:24 pm Post subject: |
|
|
Paul,
Another one for you to take a look at when you have time. In an x-y plot, if all the y data is negative, pl may choose some strange range values for the y-axis and not display the x axis. The programmer needs to set y_min and y_max carefully, and y_max must be zero to ensure the x axis is displayed.
Code: | program test
implicit none
include<windows.ins>
real(kind=2) x(1:50), y1(1:50), t, dt
integer i
t = 0.005d0 ; dt = 0.005d0 ; x = 0.d0
do i = 1, 50, 1
x(i) = t ; y1(i) = log10(t) ; t = t + dt
end do
write(6,*) maxval(y1)
write(6,*) minval(y1)
i = winio@('%ww&')
i = winio@('%tc&',rgb@(0,0,255))
call winop@("%pl[native,x_array,n_graphs=1,width=2]")
i = winio@('%pl&',300,250,50,x,y1)
call winop@("%pl[native,x_array,n_graphs=1,width=2,framed]")
i = winio@('%pl&',300,250,50,x,y1)
i = winio@('%ff&')
call winop@("%pl[native,x_array,n_graphs=1,width=2,y_min=-2.5,y_max=-0.5,framed]")
i = winio@('%pl&',300,250,50,x,y1)
call winop@("%pl[native,x_array,n_graphs=1,width=2,y_min=-2.5,y_max=0,framed]")
i = winio@('%pl',300,250,50,x,y1)
end program |
Produces:-
Regards
Ken |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Fri Mar 24, 2017 9:44 pm Post subject: |
|
|
1) And here are probably partially the same LOG_LOG, LOG_LINEAR problems like in the post above. The code below either does not display anything or complains that "Y contain zero or negative numbers" and automatically switches to LINEAR scale. The Y values as one can see do not contain zero or negative numbers
Displayed Y axis numbers in all scales including LINEAR have problem too.
2) In log scale it also does not like call winop@("%pl[Y_min=1e-8]") or
call winop@("%pl[Y_max=1e-5]") and making numbers like 1d-5, 1d-8
immediately gets new %pl on strike
3) As a suggestion if there exist CALL Winop@("%pl[Y_min=1e-8]") and zero/negative numbers in the data indeed are present the native %pl should not switch to linear scale but should keep going with LOG scale and just ignore and do not plot anything below Y_min
Code: | winapp
use clrwin
real*8 X(11), Y(11)
X(1)=6.9; Y(1)=1.0d-8
X(2)=10.; Y(2)= 6.d-8
X(3)=20.; Y(3)= 5.5d-7
X(4)=50.; Y(4)= 3.5d-6
X(5)=100.; Y(5)=7.8d-6
X(6)=200.; Y(6)=1.3d-5
X(7)=500.; Y(7)=1.8d-5
X(8)=1000.; Y(8)= 2.0d-5
X(9)=2000.; Y(9)= 1.95d-5
X(10)=4000.; Y(10)= 1.8d-5
X(11)=10000.; Y(11)= 1.7d-5
iwid=800; iheig=600
i=winio@('%ww&')
i=winio@('%fn[Tahoma]&')
i=winio@('%ts&',1.6d0)
i=winio@('%tc&',rgb@(0,0,0))
i=winio@('%bf&')
CALL winop@("%pl[x_array,N_GRAPHS=1]")
CALL winop@("%pl[native]")
call winop@("%pl[framed]")
call winop@("%pl[SCALE=log_log]") ! LOG_LINEAR, LINEAR
i=winio@('%pv%pl[x_axis="E [keV]",y_axis="Value Y",title="LOG_LOG Problem",&
& colour=black]&', iwid, iheig, 11, X, Y)
i=winio@('%ac[Esc]','exit')
end |
|
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Sat Mar 25, 2017 3:03 am Post subject: |
|
|
Thank you Paul for clarifying that. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Sat Mar 25, 2017 8:16 am Post subject: |
|
|
I guess that users will always be able to find data that the native %pl can't handle. It is after all a quick fix for the missing 64 bit SIMPLEPLOT which is a non-trivial product.
Naturally it can't handle log y for negative y and to switch to a linear scale seems reasonable to me. Negative values of log y are more difficult to handle because the automatic y min can get very large but we can look into that.
The good news is that users can always draw their own by using %gr or %pl with a callback to draw extra things on the graph. There is a subroutine that gives you the origin for the axes and the x and y pixel scaling. |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Sat Mar 25, 2017 10:19 am Post subject: |
|
|
1500 lines of code to produce this writing to a %gr region
At most 30 lines to present 95% of the same information with the new %pl
Don't be disheartened by our grumblings Paul.
Ken |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Sat Mar 25, 2017 6:03 pm Post subject: |
|
|
More complaints - better product - more users - happier developers.
But not for a long time, because more users - louder, more intense the outcry
Last edited by DanRRight on Tue Mar 28, 2017 11:25 pm; edited 1 time in total |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Tue Mar 28, 2017 9:28 pm Post subject: |
|
|
Paul said:
Quote: | There is a subroutine that gives you the origin for the axes and the x and y pixel scaling. |
I was wondering how one could programatically draw 'tailored' text without knowing the positions of all the other items.
It would also help when there's a need to specify movement of lables automatically.
For example, the axes labels are, for me anyway, much too close to the axes scaling labels
Is this subroutine documented ?
Interesting that the impetus for native &pl was for x64. It hadn't ven occurred to me .
Going forward, it would be interesting to get, in the not too distant future, something for other types of plots (3-D, hitograms, pi charts, etc .... ) which is easily applied.
I've scanned through the SIMDEM/SIMFIT socumentation and run the examples of -si_MDEM but it appears to me that the SIMDEM_ window and controls to change data etc ... are built in . What's needed is, as for native %pl, to be able to get it working in a %gr window, so the graphs can be integrated with a calculation sheet for example instead of being out on a limb |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Tue Mar 28, 2017 9:30 pm Post subject: |
|
|
nice summary Dan
you just ommitted .... hence requiring recruitment of Paul2, Paul3, etc ...... |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed Mar 29, 2017 7:28 am Post subject: |
|
|
John
The place to look is in ftn95.chm under ClearWin+->SIMPLEPLOT->Native graph plotting.
Here is a quote about adjusting the position of the captions...
Quote: | If ClearWin+ draws a title or axis caption at an inappropriate point then its position can be adjusted. For example [title=My Graph@(4.8)] using a decimal point, draws "My Graph" at a point that is adjusted 4 pixels to the right and 8 pixels down from its default position. |
Here is another quote...
Quote: | The following routine can be called from within a %PL callback function in order to get the pixel coordinates of a particular point relative to the axes.
SUBROUTINE GET_PLOT_POINT@(x,y,xpix,ypix)
REAL*8 x,y (input values)
REAL*8 xpix,ypix (output values)
The function returns zero on success or a non-zero error code.
|
but it is not a SUBROUTINE. It is a FUNCTION returning an INTEGER. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Sat Apr 01, 2017 2:51 pm Post subject: |
|
|
Yes, I'd already seen those. I was thinking more of either, for example:
a) when you want to completely replace the x, y sub-titles, maybe moving them both away from the axis but also along the axis (towards the top for example
b) maybe put legends outside of the 'graph box' (between the axes-tics and the %gr border) (which is the more usual case then within the graph region, especially when there are many curves beng plotted which can take up a large proportion of the internal graph area
I don't thnk this is possible at the moment becasuse there's a need to know where the axes, tics etc ... are located in order to write text in the right position without overlapping %PL items.
I think it's one of those things for the future development phase |
|
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
|