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, 4, 5, 6, 7, 8, 9  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
PaulLaidler
Site Admin


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

PostPosted: Thu Dec 08, 2016 8:00 pm    Post subject: Reply with quote

Agustin

Have you tried using /checkmate? There seems to be a problem with the input data.
Back to top
View user's profile Send private message AIM Address
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Thu Dec 08, 2016 8:03 pm    Post subject: Re: Reply with quote

PaulLaidler wrote:
Agustin

I have not attempted to provide major and minor tick marks.

This is actually a minor issue, so no problem

Quote:

32 bit SIMPLEPLOT provides an extensive library of functions that can be accessed from 32 bit ClearWin+ via the [user_drawn] option. All of this lies outside of the scope of the present exercise.


At this stage of %pl, I would say that for 2D plots we have almos all we need. Simpleplot offers some additional features that are nice but not esential for plotting 2D data.

The only feature that still lacks Clearwin is the option of changing the axes captions during the run of a program. I do not know if you forgot this during the last development of %pl or you find that it is at this stage out of the scope and therefore, we don't have to expect anything about this in the near future.

Agustin
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Thu Dec 08, 2016 8:08 pm    Post subject: Re: Reply with quote

PaulLaidler wrote:
Agustin

Have you tried using /checkmate? There seems to be a problem with the input data.


No, I didn't. But I think that you have also observed that there was no problem with the input data when we used the previous version of DLL.....anyway, I will check this....

Agustin
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Thu Dec 08, 2016 8:25 pm    Post subject: Reply with quote

yes!, something strange happens now.....when you are in the Function Select_Data in my program and calls the read_data subroutine, everything is fine. At the end of this subroutine, the input data is collected in the arrays exp_x and exp_y without problems...but....when you leave this subroutine and comes back to the Function, exp_x and exp_y are undefined!!!!, even the names of the files show strange symbols instead of the usual letters!....I do not understand what is going on......(see what happens between lines 27 and 29 in Modulo_funciones)

Agustin
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Thu Dec 08, 2016 8:32 pm    Post subject: Reply with quote

seems that the problem has been solved.....the initial statements of the module were
Code:
Module funciones
use datos
USE clrwin

contains

integer function select_data()
use datos


I commented the first "use datos" below "Module" and now everything runs fine.....I do not understand why the repetition of this statemente introduced such problem

I am still checking the program....thanks Paul

Agustin[/code]
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Thu Dec 08, 2016 8:42 pm    Post subject: Reply with quote

Nop!.....the program runs fine......only if I avoid things like:

ans=CHANGE_PLOT_DBL@(0, "dx", 1, 10.0)


see lines 170-180 in my code of Modulo_Funciones.....

Agustin
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Thu Jan 05, 2017 12:57 am    Post subject: Reply with quote

So the last statement which calls %pl must be i=winio@('%pl...) or
call winop@('%pl...') ? If first one then what specifically doing winop@ and why it was created? Was it not possible to do all that with winio@ ?
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Thu Jan 05, 2017 1:38 am    Post subject: Reply with quote

should be winio@('%pl......') as this creates the graphics window, the other ones just insert "options" that define previously some properties or characteristics of the final window.

Agustin
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Thu Jan 05, 2017 6:13 am    Post subject: Reply with quote

Seems to me both work...But work differently then in 32bits.
winop@ can not be imbedded into existing window.
Plus I can not port older %pl code, permanently get problems of wrong scale, not enough arguments to satisfy format, floating point overflow at address ffffffc900011101110101010ffff in KERNELBASE.DLL etc.
Only one case so far was working... out of 100 Sad

By the way, do simplest example (supplied with the built 17) work if you change style from LINEAR to LOG or LOG_LINEAR, LINEAR_LOG?

Code:
      WINAPP
      INCLUDE <clearwin.ins>
      INTEGER N,i
      PARAMETER(N=10)
      REAL*8 x(N),y(N)
      DO i=1,N
        x(i)=0.1d0*(i)
        y(i)=x(i)*x(i)
      ENDDO
      i=winio@('%ca[Quadratic]%pv&')
      i=winio@('%`bg[white]&')        !background colour
      CALL winop@("%pl[title=Graph]") !graph title
      CALL winop@("%pl[width=2]")     !pen width
      CALL winop@("%pl[y_max=0.9]")   !maximum y value on axis
      CALL winop@("%pl[x_array]")     !x data is provided as an array
      CALL winop@("%pl[scale=LOG_LOG]")
!     CALL winop@("%pl[scale=LINEAR]")
      CALL winop@("%pl[link=curves]") !join data points with curves
      CALL winop@("%pl[symbol=9]")    !mark data points with filled rhombuses
      CALL winop@("%pl[colour=red]")  !pen colour
      CALL winop@("%pl[pen_style=2]") !2=PS_DOT
      i=winio@('%pl&',400,250,N,x,y)
      i=winio@('%sf%ff%nl%cn%tt[OK]')
      END


Last edited by DanRRight on Thu Jan 05, 2017 8:52 am; edited 1 time in total
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Jan 05, 2017 8:49 am    Post subject: Reply with quote

[scale=linear] is the default so if you want linear then just comment out the line that sets the scale.
Back to top
View user's profile Send private message AIM Address
DanRRight



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

PostPosted: Thu Jan 05, 2017 8:53 am    Post subject: Reply with quote

Actually I need much more all other combinations. Do they work ?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Jan 05, 2017 9:07 am    Post subject: Reply with quote

At the moment everything works for me. Which bit is not working for you?
Back to top
View user's profile Send private message AIM Address
DanRRight



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

PostPosted: Thu Jan 05, 2017 7:00 pm    Post subject: Reply with quote

Does this code above work? It complains about scale and does not work.

Other users' respond appreciated as Paul's version of compiler could be further advanced and I suspect that here is no syntax error. My DLLs are dated Dec 7

UPDATE
OK, I found the bug. The 64bit version seems does not understand upper case STYLE=LOG_LOG or STYLE=LOG_LINEAR and needs them in lower case.

Paul will mark this while we made one more small step forward.

It is absurd amount of time to lose if you are early adopter. But if Silverfrost had large base of Examples which I'm advocating to extend for two decades (I learned this compiler on existing examples mostly done for FTN77) and automatic compiler validation on these examples this bug would be found in no time...

Now new problems. Please run this code which will read this data file A.DAT.
X range in the data is between 12 and 22. Y from 0.13 to 26

Run it with scale=log_log, scale=linear_log and scale=linear.

Is everything OK?

Code:


file A.DAT

 1.20408E+01, 8.00000E+00
 1.21958E+01, 8.55172E+00
 1.23589E+01, 1.11724E+01
 1.52626E+01, 1.44828E+01
 1.59070E+01, 1.29655E+01
 1.62659E+01, 1.22759E+01
 1.63719E+01, 1.16414E+01
 1.94388E+01, 2.62069E+01
 1.94470E+01, 2.16782E+01
 2.19592E+01, 1.37931E-01
 2.19674E+01, 3.67816E-01

Fortran source:

USE clrwin
integer, parameter :: n_dim = 1153
real*8 xstart, X(n_dim), Y(n_dim)

OPEN (UNIT=275,FILE='A.dat',STATUS='old',err=990)
do i=1,10000
  if(i.gt.n_dim) goto 100
  read(275,*,err=995,end=100) X(i), Y(i)
enddo
100 close(275)
n_points=i-1
xstart=0 ! X(1)
   
      i=winio@('%ww[no_border]%es%ca[Default Plot]%pv&')
      i=winio@('%fn[Tahoma]&')
      i=winio@('%ts&', 3.1d0)
      i=winio@('%tc&',rgb@(0,0,0))
      i=winio@('%bf&')
      i=winio@('%`bg&',rgb@(250,255,255))
      CALL winop@("%pl[SCALE=log_log]") 
      CALL winop@("%pl[x_array]") 
      CALL winop@("%pl[n_graphs=1]")   
      CALL winop@('%pl[title="Sample plot"]')
      CALL winop@("%pl[x_axis=Wavelength A]")
      CALL winop@("%pl[y_axis=Intensity@(4.0)]")
      CALL winop@("%pl[width=3]")
      CALL winop@("%pl[Y_max=200.]")
      CALL winop@("%pl[smoothing=4]") ! anti-aliasing
      CALL winop@("%pl[colour=black]")   
      CALL winop@("%pl[style=0,pen_style=0]")   

      i=winio@("%pl",1502,880,n_points,x,y)


goto 10000

!................. errors ......................
990 Print*, 'Error opening file A.dat for read'
goto 10000
995 Print*, 'Error reading file A.dat'
goto 10000
 
10000 continue
end
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Jan 06, 2017 9:20 am    Post subject: Reply with quote

Dan

Thank you for the bug report. I have fixed the 64 bit %PL so that it now accepts uppercase options.

The main thing to note is that you need to change the data supplied to %PL when using logarithmic scales. See the supplied notes on 64 bit %PL.

As you will have realised, the data does not lend itself to being joined by lines or curves. Best just to plot the points. y_max should be 30 (say).
Back to top
View user's profile Send private message AIM Address
DanRRight



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

PostPosted: Fri Jan 06, 2017 10:32 am    Post subject: Reply with quote

Wow, so we have to take a LOG10 of X and Y data ourselves before supplying it to %pl in addition to call winop@('%pl[scale=LOG_LOG]) ?

Well, that's shocking to me. i'd say changing data this way is kind of very unusual and totally antiintuitive requirement no one will expect. No other software ever required that (even bad memory older Simpleplot). Why plotting software itself is not doing that internally leaving supplied data as is? The user always tries to see his data plotted this or that way, in linear, log-log, log-linear scales, and wants to do that just in one click. Why additional body movements are required for user to change the data for that? Is this temporal behavior of new %pl?

Another point, is the Bezier always used to make smooth curves why plotted curve may hiccup and plot something very different from the one based on points ?
Back to top
View user's profile Send private message
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, 4, 5, 6, 7, 8, 9  Next
Page 7 of 9

 
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